Skip to content

Commit

Permalink
test: increase timeout for all tests
Browse files Browse the repository at this point in the history
Increased timeout for all test's server options.
Have done it to solve the problem with macOs flaky tests.

Part of #282
Part of #278
  • Loading branch information
better0fdead committed Apr 17, 2023
1 parent 0c2c66d commit 48610d7
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion connection_pool/connection_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var servers = []string{
}

var connOpts = tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion connection_pool/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type configuredTimeoutMock struct {
func (m *configuredTimeoutMock) ConfiguredTimeout(mode Mode) (time.Duration, error) {
m.called++
m.mode = mode
m.timeout = 5 * time.Second
m.timeout = 15 * time.Second
if m.retErr {
return m.timeout, fmt.Errorf("err")
}
Expand Down
2 changes: 1 addition & 1 deletion crud/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
)

var exampleOpts = tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion crud/tarantool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var invalidSpaceName = "invalid"
var indexNo = uint32(0)
var indexName = "primary_index"
var opts = tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion datetime/datetime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var isDatetimeSupported = false

var server = "127.0.0.1:3013"
var opts = Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion decimal/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
func Example() {
server := "127.0.0.1:3013"
opts := tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
Reconnect: 1 * time.Second,
MaxReconnects: 3,
User: "test",
Expand Down
4 changes: 2 additions & 2 deletions multi/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func ExampleConnect() {
multiConn, err := Connect([]string{"127.0.0.1:3031", "127.0.0.1:3032"}, tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
})
Expand All @@ -21,7 +21,7 @@ func ExampleConnect() {

func ExampleConnectWithOpts() {
multiConn, err := ConnectWithOpts([]string{"127.0.0.1:3301", "127.0.0.1:3302"}, tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}, OptsMulti{
Expand Down
2 changes: 1 addition & 1 deletion multi/multi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var spaceNo = uint32(617)
var spaceName = "test"
var indexNo = uint32(0)
var connOpts = tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion settings/tarantool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var isSettingsSupported = false

var server = "127.0.0.1:3013"
var opts = tarantool.Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down
2 changes: 1 addition & 1 deletion tarantool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var spaceName = "test"
var indexNo = uint32(0)
var indexName = "primary"
var opts = Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
//Concurrency: 32,
Expand Down
2 changes: 1 addition & 1 deletion uuid/uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var isUUIDSupported = false

var server = "127.0.0.1:3013"
var opts = Opts{
Timeout: 500 * time.Millisecond,
Timeout: 1500 * time.Millisecond,
User: "test",
Pass: "test",
}
Expand Down

0 comments on commit 48610d7

Please sign in to comment.