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/operations/testhelper_test.go')
-rw-r--r--internal/service/operations/testhelper_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/service/operations/testhelper_test.go b/internal/service/operations/testhelper_test.go
index 3a5408f6b..dc182a93e 100644
--- a/internal/service/operations/testhelper_test.go
+++ b/internal/service/operations/testhelper_test.go
@@ -7,6 +7,7 @@ import (
"os"
"path"
"testing"
+ "time"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
@@ -86,12 +87,15 @@ func runOperationServiceServer(t *testing.T) (*grpc.Server, string) {
go grpcServer.Serve(listener)
- return grpcServer, "unix://" + serverSocketPath
+ return grpcServer, serverSocketPath
}
func newOperationClient(t *testing.T, serverSocketPath string) (gitalypb.OperationServiceClient, *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 {