mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Improve flickering test on CI
This commit is contained in:
parent
93a579754b
commit
ec9bb2ace7
@ -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)
|
||||
}()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user