Skip to content

Commit 0bab0c1

Browse files
author
Isabella Siu
committed
GODRIVER-1669 fix flaky pool test (#439)
1 parent a1ef15e commit 0bab0c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x/mongo/driver/topology/pool_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@ func TestPool(t *testing.T) {
225225
case <-disconnectDone:
226226
return
227227
default:
228-
_, _ = p.get(getCtx)
229-
noerr(t, err)
228+
loopCtx, loopCancel := context.WithTimeout(getCtx, 3*time.Second)
229+
_, _ = p.get(loopCtx)
230+
loopCancel()
230231
time.Sleep(time.Microsecond)
231232
}
232233
}

0 commit comments

Comments
 (0)