Improve flickering test on CI

pull/1894/head
Jack Christensen 2024-05-08 07:54:17 -05:00
parent 93a579754b
commit ec9bb2ace7
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}()
}