Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timothy-kim-mongo committed Jun 12, 2024
1 parent f906f2f commit 9ec3cc7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions mongo/integration/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func TestClient(t *testing.T) {
// Wait for all of the server's minimum RTTs to be >250ms.
for _, desc := range topo.Description().Servers {
server, err := topo.FindServer(desc)
assert.Nil(mt, err, "FindServer error: %v", err)
assert.NoError(mt, err, "FindServer error: %v", err)
if server.RTTMonitor().Min() <= 250*time.Millisecond {
return false // the tick should wait for 100ms in this case
}
Expand Down Expand Up @@ -570,7 +570,7 @@ func TestClient(t *testing.T) {
// Wait for all of the server's minimum RTTs to be >250ms.
for _, desc := range topo.Description().Servers {
server, err := topo.FindServer(desc)
assert.Nil(mt, err, "FindServer error: %v", err)
assert.NoError(mt, err, "FindServer error: %v", err)
if server.RTTMonitor().Min() <= 250*time.Millisecond {
return false
}
Expand Down Expand Up @@ -613,7 +613,7 @@ func TestClient(t *testing.T) {
// Wait for all of the server's RTT90s to be >300ms.
for _, desc := range topo.Description().Servers {
server, err := topo.FindServer(desc)
assert.Nil(mt, err, "FindServer error: %v", err)
assert.NoError(mt, err, "FindServer error: %v", err)
if server.RTTMonitor().P90() <= 300*time.Millisecond {
return false
}
Expand Down Expand Up @@ -656,7 +656,7 @@ func TestClient(t *testing.T) {
// Wait for all of the server's RTT90s to be >275ms.
for _, desc := range topo.Description().Servers {
server, err := topo.FindServer(desc)
assert.Nil(mt, err, "FindServer error: %v", err)
assert.NoError(mt, err, "FindServer error: %v", err)
if server.RTTMonitor().P90() <= 275*time.Millisecond {
return false
}
Expand Down
8 changes: 4 additions & 4 deletions mongo/integration/csot_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestCSOTProse(t *testing.T) {

callback := func() bool {
err := mt.Client.Ping(context.Background(), nil)
assert.NotNil(mt, err, "expected Ping error, got nil")
assert.Error(mt, err, "expected Ping error, got nil")
return true
}

Expand All @@ -110,7 +110,7 @@ func TestCSOTProse(t *testing.T) {

callback := func() bool {
err := mt.Client.Ping(context.Background(), nil)
assert.NotNil(mt, err, "expected Ping error, got nil")
assert.Error(mt, err, "expected Ping error, got nil")
return true
}

Expand All @@ -129,7 +129,7 @@ func TestCSOTProse(t *testing.T) {

callback := func() bool {
err := mt.Client.Ping(context.Background(), nil)
assert.NotNil(mt, err, "expected Ping error, got nil")
assert.Error(mt, err, "expected Ping error, got nil")
return true
}

Expand All @@ -148,7 +148,7 @@ func TestCSOTProse(t *testing.T) {

callback := func() bool {
err := mt.Client.Ping(context.Background(), nil)
assert.NotNil(mt, err, "expected Ping error, got nil")
assert.Error(mt, err, "expected Ping error, got nil")
return true
}

Expand Down
4 changes: 2 additions & 2 deletions mongo/with_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func TestConvenientTransactions(t *testing.T) {
transactionCtx, cancel := context.WithCancel(context.Background())
_, _ = sess.WithTransaction(transactionCtx, func(ctx SessionContext) (interface{}, error) {
_, err := coll.InsertOne(ctx, bson.M{"x": 1})
assert.Nil(t, err, "InsertOne error: %v", err)
assert.NoError(t, err, "InsertOne error: %v", err)
cancel()
return nil, nil
})
Expand Down Expand Up @@ -564,7 +564,7 @@ func TestConvenientTransactions(t *testing.T) {
_, err := coll.InsertOne(c, bson.D{{}})
return nil, err
})
assert.Nil(t, err, "WithTransaction error: %v", err)
assert.NoError(t, err, "WithTransaction error: %v", err)
return true
}

Expand Down

0 comments on commit 9ec3cc7

Please sign in to comment.