Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/ref/testhelper_test.go')
-rw-r--r--internal/service/ref/testhelper_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/service/ref/testhelper_test.go b/internal/service/ref/testhelper_test.go
index 3d7da42bb..10cfa05e7 100644
--- a/internal/service/ref/testhelper_test.go
+++ b/internal/service/ref/testhelper_test.go
@@ -5,6 +5,7 @@ import (
"net"
"os"
"testing"
+ "time"
"github.com/golang/protobuf/ptypes/timestamp"
log "github.com/sirupsen/logrus"
@@ -112,12 +113,15 @@ func runRefServiceServer(t *testing.T) (*grpc.Server, string) {
go grpcServer.Serve(listener)
- return grpcServer, "unix://" + serverSocketPath
+ return grpcServer, serverSocketPath
}
func newRefServiceClient(t *testing.T, serverSocketPath string) (gitalypb.RefServiceClient, *grpc.ClientConn) {
connOpts := []grpc.DialOption{
grpc.WithInsecure(),
+ grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
+ return net.DialTimeout("unix", addr, timeout)
+ }),
}
conn, err := grpc.Dial(serverSocketPath, connOpts...)
if err != nil {