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.

Closes #282
Closes #278
  • Loading branch information
better0fdead committed Apr 20, 2023
1 parent b18bcfc commit fb21ba2
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 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
4 changes: 2 additions & 2 deletions queue/example_connection_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ func Example_connectionPool() {
"127.0.0.1:3015",
}
connOpts := tarantool.Opts{
Timeout: 1 * time.Second,
Timeout: 3 * time.Second,
User: "test",
Pass: "test",
}
poolOpts := connection_pool.OptsPool{
CheckTimeout: 1 * time.Second,
CheckTimeout: 3 * time.Second,
ConnectionHandler: h,
}
connPool, err := connection_pool.ConnectWithOpts(servers, connOpts, poolOpts)
Expand Down
4 changes: 2 additions & 2 deletions queue/example_msgpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *dummyData) EncodeMsgpack(e *encoder) error {
func Example_simpleQueueCustomMsgPack() {
opts := tarantool.Opts{
Reconnect: time.Second,
Timeout: 10 * time.Second,
Timeout: 20 * time.Second,
MaxReconnects: 5,
User: "test",
Pass: "test",
Expand Down Expand Up @@ -118,7 +118,7 @@ func Example_simpleQueueCustomMsgPack() {
}
task.Bury()

task, err = que.TakeTimeout(10 * time.Second)
task, err = que.TakeTimeout(20 * time.Second)
if err != nil {
log.Fatalf("Take with timeout failed: %s", err)
}
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 fb21ba2

Please sign in to comment.