diff --git a/CHANGELOG.md b/CHANGELOG.md index e8a2f8d7a..6f021dd84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release. - Connect() panics on concurrent schema update (#278) - Wrong Ttr setup by Queue.Cfg() (#278) - Flaky queue/Example_connectionPool (#278) +- Flaky queue/Example_simpleQueueCustomMsgPack (#277) ## [1.10.0] - 2022-12-31 diff --git a/connection_pool/connection_pool_test.go b/connection_pool/connection_pool_test.go index 62e55ea3c..e6738c2a1 100644 --- a/connection_pool/connection_pool_test.go +++ b/connection_pool/connection_pool_test.go @@ -33,7 +33,7 @@ var servers = []string{ } var connOpts = tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -2426,7 +2426,7 @@ func TestWatcher_Unregister_concurrent(t *testing.T) { func runTestMain(m *testing.M) int { initScript := "config.lua" waitStart := 100 * time.Millisecond - connectRetry := 3 + connectRetry := 10 retryTimeout := 500 * time.Millisecond // Tarantool supports streams and interactive transactions since version 2.10.0 diff --git a/crud/example_test.go b/crud/example_test.go index 3f2ebbf88..2b80212ca 100644 --- a/crud/example_test.go +++ b/crud/example_test.go @@ -15,7 +15,7 @@ const ( ) var exampleOpts = tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } diff --git a/crud/tarantool_test.go b/crud/tarantool_test.go index 4d7e7cd0e..0787c99e5 100644 --- a/crud/tarantool_test.go +++ b/crud/tarantool_test.go @@ -20,7 +20,7 @@ var invalidSpaceName = "invalid" var indexNo = uint32(0) var indexName = "primary_index" var opts = tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -31,7 +31,7 @@ var startOpts test_helpers.StartOpts = test_helpers.StartOpts{ User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, } diff --git a/datetime/datetime_test.go b/datetime/datetime_test.go index f4cc8b2a1..f2d1a37c7 100644 --- a/datetime/datetime_test.go +++ b/datetime/datetime_test.go @@ -37,7 +37,7 @@ var isDatetimeSupported = false var server = "127.0.0.1:3013" var opts = Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -1144,7 +1144,7 @@ func runTestMain(m *testing.M) int { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(instance) diff --git a/decimal/decimal_test.go b/decimal/decimal_test.go index d81e6c488..b4e95ebe1 100644 --- a/decimal/decimal_test.go +++ b/decimal/decimal_test.go @@ -616,7 +616,7 @@ func runTestMain(m *testing.M) int { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(instance) diff --git a/decimal/example_test.go b/decimal/example_test.go index 1d335a4c3..346419125 100644 --- a/decimal/example_test.go +++ b/decimal/example_test.go @@ -22,7 +22,7 @@ import ( func Example() { server := "127.0.0.1:3013" opts := tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, Reconnect: 1 * time.Second, MaxReconnects: 3, User: "test", diff --git a/example_test.go b/example_test.go index 7b0ee9a6a..7d16893e1 100644 --- a/example_test.go +++ b/example_test.go @@ -799,7 +799,7 @@ func ExampleConnection_Eval() { func ExampleConnect() { conn, err := tarantool.Connect("127.0.0.1:3013", tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", Concurrency: 32, @@ -895,11 +895,9 @@ func ExampleConnection_Execute() { } server := "127.0.0.1:3013" opts := tarantool.Opts{ - Timeout: 500 * time.Millisecond, - Reconnect: 1 * time.Second, - MaxReconnects: 3, - User: "test", - Pass: "test", + Timeout: 5 * time.Second, + User: "test", + Pass: "test", } client, err := tarantool.Connect(server, opts) if err != nil { @@ -1015,11 +1013,9 @@ func ExampleConnection_NewPrepared() { server := "127.0.0.1:3013" opts := tarantool.Opts{ - Timeout: 500 * time.Millisecond, - Reconnect: 1 * time.Second, - MaxReconnects: 3, - User: "test", - Pass: "test", + Timeout: 5 * time.Second, + User: "test", + Pass: "test", } conn, err := tarantool.Connect(server, opts) if err != nil { @@ -1057,8 +1053,8 @@ func ExampleConnection_NewWatcher() { server := "127.0.0.1:3013" opts := tarantool.Opts{ - Timeout: 500 * time.Millisecond, - Reconnect: 1 * time.Second, + Timeout: 5 * time.Second, + Reconnect: 5 * time.Second, MaxReconnects: 3, User: "test", Pass: "test", diff --git a/multi/example_test.go b/multi/example_test.go index e43461141..1ef369e4c 100644 --- a/multi/example_test.go +++ b/multi/example_test.go @@ -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: 5 * time.Second, User: "test", Pass: "test", }) @@ -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: 5 * time.Second, User: "test", Pass: "test", }, OptsMulti{ diff --git a/multi/multi_test.go b/multi/multi_test.go index fc165d1d4..88db98321 100644 --- a/multi/multi_test.go +++ b/multi/multi_test.go @@ -20,7 +20,7 @@ var spaceNo = uint32(617) var spaceName = "test" var indexNo = uint32(0) var connOpts = tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -611,7 +611,7 @@ func TestConnectionMulti_NewWatcher(t *testing.T) { func runTestMain(m *testing.M) int { initScript := "config.lua" waitStart := 100 * time.Millisecond - connectRetry := 3 + connectRetry := 10 retryTimeout := 500 * time.Millisecond // Tarantool supports streams and interactive transactions since version 2.10.0 diff --git a/queue/example_connection_pool_test.go b/queue/example_connection_pool_test.go index f5eb54155..7e80110fd 100644 --- a/queue/example_connection_pool_test.go +++ b/queue/example_connection_pool_test.go @@ -156,12 +156,12 @@ func Example_connectionPool() { "127.0.0.1:3015", } connOpts := tarantool.Opts{ - Timeout: 1 * time.Second, + Timeout: 5 * time.Second, User: "test", Pass: "test", } poolOpts := connection_pool.OptsPool{ - CheckTimeout: 1 * time.Second, + CheckTimeout: 5 * time.Second, ConnectionHandler: h, } connPool, err := connection_pool.ConnectWithOpts(servers, connOpts, poolOpts) diff --git a/queue/example_msgpack_test.go b/queue/example_msgpack_test.go index 2ed7f5542..5b179f5c0 100644 --- a/queue/example_msgpack_test.go +++ b/queue/example_msgpack_test.go @@ -48,7 +48,7 @@ func (c *dummyData) EncodeMsgpack(e *encoder) error { func Example_simpleQueueCustomMsgPack() { opts := tarantool.Opts{ Reconnect: time.Second, - Timeout: 2500 * time.Millisecond, + Timeout: 5 * time.Second, MaxReconnects: 5, User: "test", Pass: "test", @@ -65,9 +65,9 @@ func Example_simpleQueueCustomMsgPack() { IfNotExists: true, Kind: queue.FIFO, Opts: queue.Opts{ - Ttl: 10 * time.Second, - Ttr: 5 * time.Second, - Delay: 3 * time.Second, + Ttl: 20 * time.Second, + Ttr: 10 * time.Second, + Delay: 6 * time.Second, Pri: 1, }, } diff --git a/queue/queue_test.go b/queue/queue_test.go index 247c1751a..ffbf8feb5 100644 --- a/queue/queue_test.go +++ b/queue/queue_test.go @@ -22,7 +22,7 @@ var serversPool = []string{ var instances []test_helpers.TarantoolInstance var opts = Opts{ - Timeout: 2500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", //Concurrency: 32, @@ -913,7 +913,7 @@ func runTestMain(m *testing.M) int { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) diff --git a/settings/tarantool_test.go b/settings/tarantool_test.go index d32767116..4bfa5cf37 100644 --- a/settings/tarantool_test.go +++ b/settings/tarantool_test.go @@ -19,7 +19,7 @@ var isSettingsSupported = false var server = "127.0.0.1:3013" var opts = tarantool.Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -637,7 +637,7 @@ func runTestMain(m *testing.M) int { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) diff --git a/shutdown_test.go b/shutdown_test.go index 105a4dff6..fe268b41e 100644 --- a/shutdown_test.go +++ b/shutdown_test.go @@ -22,7 +22,7 @@ var shtdnClntOpts = Opts{ User: opts.User, Pass: opts.Pass, Timeout: 20 * time.Second, - Reconnect: 200 * time.Millisecond, + Reconnect: 500 * time.Millisecond, MaxReconnects: 10, RequiredProtocolInfo: ProtocolInfo{Features: []ProtocolFeature{WatchersFeature}}, } @@ -32,7 +32,7 @@ var shtdnSrvOpts = test_helpers.StartOpts{ User: shtdnClntOpts.User, Pass: shtdnClntOpts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, } diff --git a/ssl_test.go b/ssl_test.go index ca0773b58..0a62d03c3 100644 --- a/ssl_test.go +++ b/ssl_test.go @@ -130,7 +130,7 @@ func serverTnt(serverOpts, clientOpts SslOpts, auth Auth) (test_helpers.Tarantoo User: "test", Pass: "test", WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) } diff --git a/tarantool_test.go b/tarantool_test.go index 58e40cbd0..7182d9e8c 100644 --- a/tarantool_test.go +++ b/tarantool_test.go @@ -28,7 +28,7 @@ var startOpts test_helpers.StartOpts = test_helpers.StartOpts{ User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, } @@ -75,7 +75,7 @@ var spaceName = "test" var indexNo = uint32(0) var indexName = "primary" var opts = Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", //Concurrency: 32, @@ -3580,7 +3580,7 @@ func TestConnection_NewWatcher_reconnect(t *testing.T) { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(inst) diff --git a/uuid/uuid_test.go b/uuid/uuid_test.go index e04ab5ab9..f5a596e76 100644 --- a/uuid/uuid_test.go +++ b/uuid/uuid_test.go @@ -20,7 +20,7 @@ var isUUIDSupported = false var server = "127.0.0.1:3013" var opts = Opts{ - Timeout: 500 * time.Millisecond, + Timeout: 5 * time.Second, User: "test", Pass: "test", } @@ -158,7 +158,7 @@ func runTestMain(m *testing.M) int { User: opts.User, Pass: opts.Pass, WaitStart: 100 * time.Millisecond, - ConnectRetry: 3, + ConnectRetry: 10, RetryTimeout: 500 * time.Millisecond, }) defer test_helpers.StopTarantoolWithCleanup(inst)