diff --git a/x/mongo/driver/topology/connection_test.go b/x/mongo/driver/topology/connection_test.go index 8eaaedb639..4780959a97 100644 --- a/x/mongo/driver/topology/connection_test.go +++ b/x/mongo/driver/topology/connection_test.go @@ -151,7 +151,7 @@ func TestConnection(t *testing.T) { close(doneChan) assert.Eventually(t, - func() bool { return done.Load().(bool) }, + func() bool { return done.Load() != nil && done.Load().(bool) }, 100*time.Millisecond, 1*time.Millisecond, "TODO")