From ec9bb2ace74dcdfc360ef9242a8fa8add1b29be1 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Wed, 8 May 2024 07:54:17 -0500 Subject: [PATCH] Improve flickering test on CI --- pgconn/pgconn_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pgconn/pgconn_test.go b/pgconn/pgconn_test.go index e91f699a..3d89cca7 100644 --- a/pgconn/pgconn_test.go +++ b/pgconn/pgconn_test.go @@ -3632,6 +3632,7 @@ func TestCancelRequestContextWatcherHandler(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 4*time.Millisecond) defer cancel() pgConn.Exec(ctx, "select 1, pg_sleep(0.010)").ReadAll() + time.Sleep(100 * time.Millisecond) // ensure a cancel request that was a little late doesn't interrupt ensureConnValid. ensureConnValid(t, pgConn) }() }