From b8e1bcb8f6c153adee2d45862b86bc4c43a954a4 Mon Sep 17 00:00:00 2001 From: themilchenko Date: Tue, 24 Sep 2024 18:23:37 +0300 Subject: [PATCH] ci: fix connection refused problem There was a problem on macOS pipeline that integration tests written on Go fail sometimes with an `connection refused` error. An instance of Tarantool was unable to start with the specified configuration. After the patch start options such as `WaitStart`, `ConnectionRetry` and `RetryTimeout` were increased to have enough time for Tarantool startup. Also the port number in replicaset integration test was changed due to collision with instance from previous integration test `connector`. Part of #912 --- cli/connector/integration_test.go | 4 ++-- cli/replicaset/integration_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/connector/integration_test.go b/cli/connector/integration_test.go index e307b19b9..5e42b9a26 100644 --- a/cli/connector/integration_test.go +++ b/cli/connector/integration_test.go @@ -328,9 +328,9 @@ func runTestMain(m *testing.M) int { WorkDir: workDir, User: opts.User, Pass: opts.Pass, - WaitStart: time.Second, + WaitStart: 5 * time.Second, ConnectRetry: 5, - RetryTimeout: 200 * time.Millisecond, + RetryTimeout: 100 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(inst) if err != nil { diff --git a/cli/replicaset/integration_test.go b/cli/replicaset/integration_test.go index a6ab8f2bb..633254ef9 100644 --- a/cli/replicaset/integration_test.go +++ b/cli/replicaset/integration_test.go @@ -19,7 +19,7 @@ import ( ) const workDir = "work_dir" -const server = "127.0.0.1:3013" +const server = "127.0.0.1:3015" const console = workDir + "/" + "console.control" var opts = tarantool.Opts{ @@ -166,7 +166,7 @@ func (e *instanceEvalerMock) Eval(instance running.InstanceCtx, require.NotNil(e.T, evaler) data, err := evaler.Eval("return box.cfg.listen", []any{}, connector.RequestOpts{}) require.NoError(e.T, err) - require.Equal(e.T, []any{"127.0.0.1:3013"}, data) + require.Equal(e.T, []any{"127.0.0.1:3015"}, data) return e.Done, e.Error } @@ -551,9 +551,9 @@ func runTestMain(m *testing.M) int { WorkDir: workDir, User: opts.User, Pass: opts.Pass, - WaitStart: time.Second, + WaitStart: 5 * time.Second, ConnectRetry: 5, - RetryTimeout: 200 * time.Millisecond, + RetryTimeout: 100 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(inst) if err != nil {