Skip to content

Commit

Permalink
ci: fix connection refused problem
Browse files Browse the repository at this point in the history
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
  • Loading branch information
themilchenko committed Oct 1, 2024
1 parent 3c5d56a commit dd7e42f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/connector/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions cli/replicaset/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit dd7e42f

Please sign in to comment.