From b068d537532c820a412f9b1b5e582afc23ae930c Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 25 Jun 2022 14:07:48 -0500 Subject: [PATCH] Fix race in test Goroutine should have it's own err var instead of sharing. --- pgconn/pgconn_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgconn/pgconn_test.go b/pgconn/pgconn_test.go index 357a99c1..87936225 100644 --- a/pgconn/pgconn_test.go +++ b/pgconn/pgconn_test.go @@ -1855,7 +1855,7 @@ func TestConnCancelRequest(t *testing.T) { // Once Flush is available this could use that instead. time.Sleep(500 * time.Millisecond) - err = pgConn.CancelRequest(context.Background()) + err := pgConn.CancelRequest(context.Background()) require.NoError(t, err) }()