1 Commits
Author SHA1 Message Date
sneak dd4a3d85f4 Let ircserver and db tests pass under heavy host load (closes #265)
check / check (push) Failing after 3s
testTimeout, the limit on every read and wait in the ircserver tests,
goes from 5 to 30 seconds. A passing test never reaches it.

TestQuietClientNotAnsweringPingIsClosed uses a 4 second ping interval,
and measures its upper bound from the end of registration. The bound
leaves 2.7 seconds for scheduling delay, and is a second before the
close a two-interval read deadline would make. The lower bound, from
the client's last line, is unchanged.

The cancelled-query tests in internal/db run the endless query for 2
seconds instead of 100 ms. A context that ends before the statement
starts interrupts nothing, so the pool kept its connection.

Model: opus-5-5
2026-11-10 23:46:38 +00:00
+6 -5
View File
@@ -557,13 +557,14 @@ func TestQuietClientNotAnsweringPingIsClosed(t *testing.T) {
t.Parallel()
// A read deadline of two ping intervals would close the
// connection at latest. The ping interval is longer than
// testPingInterval, so that the time between the expected
// close and latest leaves room for a loaded host.
// connection a second after latest. The ping interval is
// longer than testPingInterval, so that the time between
// the expected close and latest leaves room for a loaded
// host.
const (
interval = 3 * time.Second
interval = 4 * time.Second
earliest = interval + testPongDeadline
latest = 2 * interval
latest = 2*interval - time.Second
)
env := newTestEnvWithPingTimes(