Skip to content

Commit fab59cf

Browse files
committed
Improve reliability of new pool test.
1 parent d14bdbf commit fab59cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x/mongo/driver/topology/pool_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ func TestPool(t *testing.T) {
853853
d := newdialer(&net.Dialer{})
854854
p := newPool(poolConfig{
855855
Address: address.Address(addr.String()),
856-
MaxIdleTime: 1 * time.Millisecond,
856+
MaxIdleTime: 100 * time.Millisecond,
857857
}, WithDialer(func(Dialer) Dialer { return d }))
858858
err := p.ready()
859859
noerr(t, err)
@@ -862,10 +862,10 @@ func TestPool(t *testing.T) {
862862
c, err := p.checkOut(context.Background())
863863
noerr(t, err)
864864

865-
// Sleep for 10ms, which will exceed the 1ms connection idle timeout. Then check the
865+
// Sleep for 110ms, which will exceed the 100ms connection idle timeout. Then check the
866866
// connection back in and expect that it is not closed because checkIn() should bump the
867867
// connection idle deadline.
868-
time.Sleep(10 * time.Millisecond)
868+
time.Sleep(110 * time.Millisecond)
869869
err = p.checkIn(c)
870870
noerr(t, err)
871871

0 commit comments

Comments
 (0)