Skip to content

Commit

Permalink
added the sleeps to the restart test as well to make sure that the in…
Browse files Browse the repository at this point in the history
…itial connections and insert succeeds to a higher rate
  • Loading branch information
adamtajti committed Aug 29, 2023
1 parent c638e06 commit 3b2261a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions integration-tests/fault-injection/baseline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ func TestBaseline(t *testing.T) {
mongo := harness.StartMongoServer()
defer mongo.Stop()

// Testing if sleeping here helps with the connections. It seems like the first couple of mongo connections
// are thrown away by the server and the writes are not configured to automatically retry.
// Sleeping here for a while as the initial connection seems to be unreliable
time.Sleep(time.Second * 1)

redis := harness.StartRedisServer()
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/fault-injection/restart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ func TestRestart(t *testing.T) {
mongo := harness.StartMongoServer()
defer mongo.Stop()

// Sleeping here for a while as the initial connection seems to be unreliable
time.Sleep(time.Second * 1)

redis := harness.StartRedisServer()
defer redis.Stop()

Expand Down

0 comments on commit 3b2261a

Please sign in to comment.