Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Aug 15, 2024
1 parent d72dcff commit 17c4846
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions mongo/integration/mtest/mongotest.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,13 +744,9 @@ func (t *T) createTestClient() {
if err != nil {
t.Fatalf("error creating client: %v", err)
}
ctx := context.Background()
if err := t.Client.Connect(ctx); err != nil {
if err := t.Client.Connect(context.Background()); err != nil {
t.Fatalf("error connecting client: %v", err)
}
if err := t.Client.Ping(ctx, nil); err != nil {
t.Fatalf("error pinging client: %v", err)
}
}

func (t *T) createTestCollection() {
Expand Down
3 changes: 3 additions & 0 deletions mongo/integration/unified_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ func runSpecTestCase(mt *mtest.T, test *testCase, testFile testFile) {
testClientOpts.SetHeartbeatInterval(defaultHeartbeatInterval)
}
mt.ResetClient(testClientOpts)
if err := mt.Client.Ping(context.Background(), nil); err != nil {
assert.Nil(mt, err, "error pinging client")
}

// Record the underlying topology for the test's Client.
test.testTopology = getTopologyFromClient(mt.Client)
Expand Down

0 comments on commit 17c4846

Please sign in to comment.