TestIntegrationKill in internal/ircserver/integration_test.go failed once in 27 runs during the review of #204. After the KILL, alice waited the test's 5 seconds for bob's QUIT and timed out. It did not fail in 21 runs on next, which is too few to tell the two apart. Requests on that host took milliseconds, and the IRC relay also polls on a timer, so a slow machine alone is an unlikely cause. A rare hang in the IRC listener, in delivering the QUIT or in closing the killed connection, is more likely. If so, a real IRC user could see a killed user stay in a channel. A test that fails at random also makes next red at random.
Fix: find what can hold up the QUIT that a KILL sends to the victim's channels, or the victim's disconnect, for more than 5 seconds, and fix that cause. Do not lengthen the test's wait or retry the test.
Definition of done
The cause is named in the PR body in one or two plain sentences, with the code it is in.
The fix removes it. If the cause is in the test and not in the server, the PR shows that and fixes the test.
TestIntegrationKill passes in at least 50 runs in a row under -race while the host is busy, run through script/ with the count raised in a throwaway copy, not committed.
One reviewed PR against next.
Model: opus-5-5
`TestIntegrationKill` in `internal/ircserver/integration_test.go` failed once in 27 runs during the review of https://git.eeqj.de/sneak/neoirc/pulls/204. After the `KILL`, alice waited the test's 5 seconds for bob's `QUIT` and timed out. It did not fail in 21 runs on `next`, which is too few to tell the two apart. Requests on that host took milliseconds, and the IRC relay also polls on a timer, so a slow machine alone is an unlikely cause. A rare hang in the IRC listener, in delivering the `QUIT` or in closing the killed connection, is more likely. If so, a real IRC user could see a killed user stay in a channel. A test that fails at random also makes `next` red at random.
Fix: find what can hold up the `QUIT` that a `KILL` sends to the victim's channels, or the victim's disconnect, for more than 5 seconds, and fix that cause. Do not lengthen the test's wait or retry the test.
## Definition of done
1. The cause is named in the PR body in one or two plain sentences, with the code it is in.
2. The fix removes it. If the cause is in the test and not in the server, the PR shows that and fixes the test.
3. `TestIntegrationKill` passes in at least 50 runs in a row under `-race` while the host is busy, run through `script/` with the count raised in a throwaway copy, not committed.
4. One reviewed PR against `next`.
Model: opus-5-5
Fixed in #206. When bob's connection ended while his relay was reading its queue, the cancelled query made the database pool close its only connection. That deleted the tests' in-memory database, so alice never got the QUIT. The relay now finishes that read before it stops.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/neoirc/pulls/206. When bob's connection ended while his relay was reading its queue, the cancelled query made the database pool close its only connection. That deleted the tests' in-memory database, so alice never got the `QUIT`. The relay now finishes that read before it stops.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
TestIntegrationKillininternal/ircserver/integration_test.gofailed once in 27 runs during the review of #204. After theKILL, alice waited the test's 5 seconds for bob'sQUITand timed out. It did not fail in 21 runs onnext, which is too few to tell the two apart. Requests on that host took milliseconds, and the IRC relay also polls on a timer, so a slow machine alone is an unlikely cause. A rare hang in the IRC listener, in delivering theQUITor in closing the killed connection, is more likely. If so, a real IRC user could see a killed user stay in a channel. A test that fails at random also makesnextred at random.Fix: find what can hold up the
QUITthat aKILLsends to the victim's channels, or the victim's disconnect, for more than 5 seconds, and fix that cause. Do not lengthen the test's wait or retry the test.Definition of done
TestIntegrationKillpasses in at least 50 runs in a row under-racewhile the host is busy, run throughscript/with the count raised in a throwaway copy, not committed.next.Model: opus-5-5
Fixed in #206. When bob's connection ended while his relay was reading its queue, the cancelled query made the database pool close its only connection. That deleted the tests' in-memory database, so alice never got the
QUIT. The relay now finishes that read before it stops.Model: opus-5-5