diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2022-01-28 14:15:29 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2022-01-28 15:48:55 +0300 |
commit | 710409d89c8f31a7b711612b1860b8b2771965c4 (patch) | |
tree | 645138ad2dbe02078f98877f944f1906cea05b52 | |
parent | 2777c924485c51d25cf19a09c2e109e9b0f80f4a (diff) |
Remove timeout when dialing server in tests
There is currently a 15s timeout for dialing the test server. This
causes flakes every now and then when the test execute on slower
environments.
-rw-r--r-- | internal/testhelper/testserver/gitaly.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/testhelper/testserver/gitaly.go b/internal/testhelper/testserver/gitaly.go index 9fe31e7c3..4658d57bd 100644 --- a/internal/testhelper/testserver/gitaly.go +++ b/internal/testhelper/testserver/gitaly.go @@ -1,11 +1,9 @@ package testserver import ( - "context" "net" "os" "testing" - "time" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" @@ -131,8 +129,7 @@ func waitHealthy(t testing.TB, addr string, authToken string) { grpcOpts = append(grpcOpts, grpc.WithPerRPCCredentials(gitalyauth.RPCCredentialsV2(authToken))) } - ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) - defer cancel() + ctx := testhelper.Context(t) conn, err := client.DialContext(ctx, addr, grpcOpts) require.NoError(t, err) |