Skip to content

Commit 780fd13

Browse files
Check the nil condition on done value
1 parent 4bbb04f commit 780fd13

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

x/mongo/driver/topology/connection_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ func TestConnection(t *testing.T) {
151151
close(doneChan)
152152

153153
assert.Eventually(t,
154-
func() bool { return done.Load().(bool) },
154+
func() bool {
155+
if done.Load() == nil {
156+
return false
157+
}
158+
159+
return done.Load().(bool)
160+
},
155161
100*time.Millisecond,
156162
1*time.Millisecond,
157163
"TODO")

0 commit comments

Comments
 (0)