Skip to content

Commit 521c0c3

Browse files
better0fdeadoleg-jukovec
authored andcommitted
test: increase timeout for all tests
Increased timeout for all test's server options. Have done it to solve the problem with macOs flaky tests. Closes #277 Closes #282 Closes #291
1 parent 60111b3 commit 521c0c3

18 files changed

+41
-44
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
2929
- Connect() panics on concurrent schema update (#278)
3030
- Wrong Ttr setup by Queue.Cfg() (#278)
3131
- Flaky queue/Example_connectionPool (#278)
32+
- Flaky queue/Example_simpleQueueCustomMsgPack (#277)
3233

3334
## [1.10.0] - 2022-12-31
3435

connection_pool/connection_pool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var servers = []string{
3333
}
3434

3535
var connOpts = tarantool.Opts{
36-
Timeout: 500 * time.Millisecond,
36+
Timeout: 5 * time.Second,
3737
User: "test",
3838
Pass: "test",
3939
}
@@ -2426,7 +2426,7 @@ func TestWatcher_Unregister_concurrent(t *testing.T) {
24262426
func runTestMain(m *testing.M) int {
24272427
initScript := "config.lua"
24282428
waitStart := 100 * time.Millisecond
2429-
connectRetry := 3
2429+
connectRetry := 10
24302430
retryTimeout := 500 * time.Millisecond
24312431

24322432
// Tarantool supports streams and interactive transactions since version 2.10.0

crud/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
)
1616

1717
var exampleOpts = tarantool.Opts{
18-
Timeout: 500 * time.Millisecond,
18+
Timeout: 5 * time.Second,
1919
User: "test",
2020
Pass: "test",
2121
}

crud/tarantool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var invalidSpaceName = "invalid"
2020
var indexNo = uint32(0)
2121
var indexName = "primary_index"
2222
var opts = tarantool.Opts{
23-
Timeout: 500 * time.Millisecond,
23+
Timeout: 5 * time.Second,
2424
User: "test",
2525
Pass: "test",
2626
}
@@ -31,7 +31,7 @@ var startOpts test_helpers.StartOpts = test_helpers.StartOpts{
3131
User: opts.User,
3232
Pass: opts.Pass,
3333
WaitStart: 100 * time.Millisecond,
34-
ConnectRetry: 3,
34+
ConnectRetry: 10,
3535
RetryTimeout: 500 * time.Millisecond,
3636
}
3737

datetime/datetime_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var isDatetimeSupported = false
3737

3838
var server = "127.0.0.1:3013"
3939
var opts = Opts{
40-
Timeout: 500 * time.Millisecond,
40+
Timeout: 5 * time.Second,
4141
User: "test",
4242
Pass: "test",
4343
}
@@ -1144,7 +1144,7 @@ func runTestMain(m *testing.M) int {
11441144
User: opts.User,
11451145
Pass: opts.Pass,
11461146
WaitStart: 100 * time.Millisecond,
1147-
ConnectRetry: 3,
1147+
ConnectRetry: 10,
11481148
RetryTimeout: 500 * time.Millisecond,
11491149
})
11501150
defer test_helpers.StopTarantoolWithCleanup(instance)

decimal/decimal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ func runTestMain(m *testing.M) int {
616616
User: opts.User,
617617
Pass: opts.Pass,
618618
WaitStart: 100 * time.Millisecond,
619-
ConnectRetry: 3,
619+
ConnectRetry: 10,
620620
RetryTimeout: 500 * time.Millisecond,
621621
})
622622
defer test_helpers.StopTarantoolWithCleanup(instance)

decimal/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
func Example() {
2323
server := "127.0.0.1:3013"
2424
opts := tarantool.Opts{
25-
Timeout: 500 * time.Millisecond,
25+
Timeout: 5 * time.Second,
2626
Reconnect: 1 * time.Second,
2727
MaxReconnects: 3,
2828
User: "test",

example_test.go

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ func ExampleConnection_Eval() {
799799

800800
func ExampleConnect() {
801801
conn, err := tarantool.Connect("127.0.0.1:3013", tarantool.Opts{
802-
Timeout: 500 * time.Millisecond,
802+
Timeout: 5 * time.Second,
803803
User: "test",
804804
Pass: "test",
805805
Concurrency: 32,
@@ -895,11 +895,9 @@ func ExampleConnection_Execute() {
895895
}
896896
server := "127.0.0.1:3013"
897897
opts := tarantool.Opts{
898-
Timeout: 500 * time.Millisecond,
899-
Reconnect: 1 * time.Second,
900-
MaxReconnects: 3,
901-
User: "test",
902-
Pass: "test",
898+
Timeout: 5 * time.Second,
899+
User: "test",
900+
Pass: "test",
903901
}
904902
client, err := tarantool.Connect(server, opts)
905903
if err != nil {
@@ -1015,11 +1013,9 @@ func ExampleConnection_NewPrepared() {
10151013

10161014
server := "127.0.0.1:3013"
10171015
opts := tarantool.Opts{
1018-
Timeout: 500 * time.Millisecond,
1019-
Reconnect: 1 * time.Second,
1020-
MaxReconnects: 3,
1021-
User: "test",
1022-
Pass: "test",
1016+
Timeout: 5 * time.Second,
1017+
User: "test",
1018+
Pass: "test",
10231019
}
10241020
conn, err := tarantool.Connect(server, opts)
10251021
if err != nil {
@@ -1057,8 +1053,8 @@ func ExampleConnection_NewWatcher() {
10571053

10581054
server := "127.0.0.1:3013"
10591055
opts := tarantool.Opts{
1060-
Timeout: 500 * time.Millisecond,
1061-
Reconnect: 1 * time.Second,
1056+
Timeout: 5 * time.Second,
1057+
Reconnect: 5 * time.Second,
10621058
MaxReconnects: 3,
10631059
User: "test",
10641060
Pass: "test",

multi/example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func ExampleConnect() {
1111
multiConn, err := Connect([]string{"127.0.0.1:3031", "127.0.0.1:3032"}, tarantool.Opts{
12-
Timeout: 500 * time.Millisecond,
12+
Timeout: 5 * time.Second,
1313
User: "test",
1414
Pass: "test",
1515
})
@@ -21,7 +21,7 @@ func ExampleConnect() {
2121

2222
func ExampleConnectWithOpts() {
2323
multiConn, err := ConnectWithOpts([]string{"127.0.0.1:3301", "127.0.0.1:3302"}, tarantool.Opts{
24-
Timeout: 500 * time.Millisecond,
24+
Timeout: 5 * time.Second,
2525
User: "test",
2626
Pass: "test",
2727
}, OptsMulti{

multi/multi_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var spaceNo = uint32(617)
2020
var spaceName = "test"
2121
var indexNo = uint32(0)
2222
var connOpts = tarantool.Opts{
23-
Timeout: 500 * time.Millisecond,
23+
Timeout: 5 * time.Second,
2424
User: "test",
2525
Pass: "test",
2626
}
@@ -611,7 +611,7 @@ func TestConnectionMulti_NewWatcher(t *testing.T) {
611611
func runTestMain(m *testing.M) int {
612612
initScript := "config.lua"
613613
waitStart := 100 * time.Millisecond
614-
connectRetry := 3
614+
connectRetry := 10
615615
retryTimeout := 500 * time.Millisecond
616616

617617
// Tarantool supports streams and interactive transactions since version 2.10.0

0 commit comments

Comments
 (0)