Skip to content

Commit

Permalink
adding pings for the secondary nodes as well, the sleep worked, somet…
Browse files Browse the repository at this point in the history
…hing is off with the initial connection state
  • Loading branch information
adamtajti committed Aug 29, 2023
1 parent 448f3fa commit dd715f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration-tests/fault-injection/harness/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ func (server *MongoServer) Client() *mongo.Client {

err = client.Ping(ctx, readpref.Primary())
if err != nil {
panic("Error pinging Mongo")
panic("Error pinging primary Mongo for read")
}

err = client.Ping(ctx, readpref.Secondary())
if err != nil {
panic("Error pinging secondary Mongo for read")
}

return client
Expand Down

0 comments on commit dd715f1

Please sign in to comment.