Skip to content

Commit 45a88ec

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 #282
1 parent bc2537e commit 45a88ec

14 files changed

+27
-31
lines changed

connection_pool/connection_pool_test.go

Lines changed: 1 addition & 1 deletion
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
}

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: 1 addition & 1 deletion
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
}

datetime/datetime_test.go

Lines changed: 1 addition & 1 deletion
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
}

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: 1 addition & 1 deletion
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
}

queue/example_connection_pool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ func Example_connectionPool() {
156156
"127.0.0.1:3015",
157157
}
158158
connOpts := tarantool.Opts{
159-
Timeout: 1 * time.Second,
159+
Timeout: 5 * time.Second,
160160
User: "test",
161161
Pass: "test",
162162
}
163163
poolOpts := connection_pool.OptsPool{
164-
CheckTimeout: 1 * time.Second,
164+
CheckTimeout: 5 * time.Second,
165165
ConnectionHandler: h,
166166
}
167167
connPool, err := connection_pool.ConnectWithOpts(servers, connOpts, poolOpts)

queue/example_msgpack_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (c *dummyData) EncodeMsgpack(e *encoder) error {
4848
func Example_simpleQueueCustomMsgPack() {
4949
opts := tarantool.Opts{
5050
Reconnect: time.Second,
51-
Timeout: 2500 * time.Millisecond,
51+
Timeout: 5 * time.Second,
5252
MaxReconnects: 5,
5353
User: "test",
5454
Pass: "test",
@@ -65,9 +65,9 @@ func Example_simpleQueueCustomMsgPack() {
6565
IfNotExists: true,
6666
Kind: queue.FIFO,
6767
Opts: queue.Opts{
68-
Ttl: 10 * time.Second,
69-
Ttr: 5 * time.Second,
70-
Delay: 3 * time.Second,
68+
Ttl: 20 * time.Second,
69+
Ttr: 10 * time.Second,
70+
Delay: 6 * time.Second,
7171
Pri: 1,
7272
},
7373
}

queue/queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var serversPool = []string{
2222
var instances []test_helpers.TarantoolInstance
2323

2424
var opts = Opts{
25-
Timeout: 2500 * time.Millisecond,
25+
Timeout: 5 * time.Second,
2626
User: "test",
2727
Pass: "test",
2828
//Concurrency: 32,

settings/tarantool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var isSettingsSupported = false
1919

2020
var server = "127.0.0.1:3013"
2121
var opts = tarantool.Opts{
22-
Timeout: 500 * time.Millisecond,
22+
Timeout: 5 * time.Second,
2323
User: "test",
2424
Pass: "test",
2525
}

tarantool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var spaceName = "test"
7575
var indexNo = uint32(0)
7676
var indexName = "primary"
7777
var opts = Opts{
78-
Timeout: 500 * time.Millisecond,
78+
Timeout: 5 * time.Second,
7979
User: "test",
8080
Pass: "test",
8181
//Concurrency: 32,

uuid/uuid_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var isUUIDSupported = false
2020

2121
var server = "127.0.0.1:3013"
2222
var opts = Opts{
23-
Timeout: 500 * time.Millisecond,
23+
Timeout: 5 * time.Second,
2424
User: "test",
2525
Pass: "test",
2626
}

0 commit comments

Comments
 (0)