Skip to content

Commit

Permalink
GODRIVER-1669 fix flaky pool test (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
Isabella Siu committed Jul 14, 2020
1 parent a1ef15e commit 0bab0c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/mongo/driver/topology/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ func TestPool(t *testing.T) {
case <-disconnectDone:
return
default:
_, _ = p.get(getCtx)
noerr(t, err)
loopCtx, loopCancel := context.WithTimeout(getCtx, 3*time.Second)
_, _ = p.get(loopCtx)
loopCancel()
time.Sleep(time.Microsecond)
}
}
Expand Down

0 comments on commit 0bab0c1

Please sign in to comment.