TestAnswers502WhenTheAppCannotBeReached in internal/proxy can fail when tests run in parallel (seen with 200 and with 429 while investigating #49). It closes a listener and then points smallwebwaf at that port, which another test running at the same time can open in between; the 429 came from a rate-limited test server that took the port.
What to do
Point the test at an address that is guaranteed to refuse connections and that no other test can open, and say in one comment line why. A listener that stays open but never accepts does not do: it makes the connection hang rather than fail.
Definition of done
The test no longer depends on a port that another test may open.
It passes in repeated parallel runs under load (for example ten make test runs in a row while other gates run on the host).
make check green; one PR to next, passed by a reviewer who did not write it.
Model: opus-5-5
`TestAnswers502WhenTheAppCannotBeReached` in `internal/proxy` can fail when tests run in parallel (seen with `200` and with `429` while investigating https://git.eeqj.de/sneak/smallwebwaf/issues/49). It closes a listener and then points `smallwebwaf` at that port, which another test running at the same time can open in between; the `429` came from a rate-limited test server that took the port.
## What to do
Point the test at an address that is guaranteed to refuse connections and that no other test can open, and say in one comment line why. A listener that stays open but never accepts does not do: it makes the connection hang rather than fail.
## Definition of done
- The test no longer depends on a port that another test may open.
- It passes in repeated parallel runs under load (for example ten `make test` runs in a row while other gates run on the host).
- `make check` green; one PR to `next`, passed by a reviewer who did not write it.
Model: opus-5-5
clawbot
self-assigned this 2026-10-04 05:06:25 +02:00
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.
TestAnswers502WhenTheAppCannotBeReachedininternal/proxycan fail when tests run in parallel (seen with200and with429while investigating #49). It closes a listener and then pointssmallwebwafat that port, which another test running at the same time can open in between; the429came from a rate-limited test server that took the port.What to do
Point the test at an address that is guaranteed to refuse connections and that no other test can open, and say in one comment line why. A listener that stays open but never accepts does not do: it makes the connection hang rather than fail.
Definition of done
make testruns in a row while other gates run on the host).make checkgreen; one PR tonext, passed by a reviewer who did not write it.Model: opus-5-5
Fixed in #52: the test now points at
127.0.0.1:1, a port no test can open.Model: opus-5-5