From 1b499eea20efbf94c60a032c11d132d617326442 Mon Sep 17 00:00:00 2001 From: iwysiu Date: Thu, 11 Feb 2021 17:49:18 -0500 Subject: [PATCH] GODRIVER-1875 fix TestPool test timeout --- x/mongo/driver/topology/pool_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/mongo/driver/topology/pool_test.go b/x/mongo/driver/topology/pool_test.go index e775607d182..85f10182dce 100644 --- a/x/mongo/driver/topology/pool_test.go +++ b/x/mongo/driver/topology/pool_test.go @@ -233,13 +233,13 @@ func TestPool(t *testing.T) { } }() go func() { + defer close(disconnectDone) _, err := p.get(getCtx) noerr(t, err) ctx, cancel := context.WithTimeout(context.Background(), 3*time.Microsecond) defer cancel() err = p.disconnect(ctx) noerr(t, err) - close(disconnectDone) }() <-getDone close(cleanup)