make check on next failed once more under heavy host load, on two timing tests in internal/proxy, and passed when the same tests ran again seconds later:
TestUpgradedConnectionOutlastsTheTimeouts: "read the answer to the upgrade: unexpected EOF". All four timeouts are 300 ms; if the test process is held up for 300 ms before the upgrade is answered, the timeout rightly runs out before the upgrade, and the test fails although smallwebwaf did what SPEC.md asks.
TestRequestTimeouts, case "upstream request timeout, waiting on the app": 408 where it wants 504. This is the reverse of #49: if the client is held up before the app's buffers fill, smallwebwaf is still waiting on the client when the timeout runs out, and 408 is the right answer.
The tests run with a 300 ms timeout on a host where the test process is sometimes held up longer than that. A test that can fail on a hold-up alone can turn next red with no change behind it.
What to do
Go through every test in internal/proxy that uses shortTimeout and make each one unable to fail on a hold-up of the test process alone, without weakening what it checks:
where SPEC.md names the right answer for what actually happened, the test expects that answer, as #50 did for the "waiting on the client" cases;
where a hold-up can only land in a step that sets up the case rather than in the behaviour under test (for example the upgrade itself, before the timeouts the test is about), make that step unable to run into the timeout.
Each test must still fail if smallwebwaf gets its rule wrong.
Definition of done
Every test in internal/proxy that uses shortTimeout is checked; the PR body lists any that needed no change, with one line on why.
The tests pass in repeated 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
`make check` on `next` failed once more under heavy host load, on two timing tests in `internal/proxy`, and passed when the same tests ran again seconds later:
- `TestUpgradedConnectionOutlastsTheTimeouts`: "read the answer to the upgrade: unexpected EOF". All four timeouts are 300 ms; if the test process is held up for 300 ms before the upgrade is answered, the timeout rightly runs out before the upgrade, and the test fails although `smallwebwaf` did what `SPEC.md` asks.
- `TestRequestTimeouts`, case "upstream request timeout, waiting on the app": `408` where it wants `504`. This is the reverse of https://git.eeqj.de/sneak/smallwebwaf/issues/49: if the client is held up before the app's buffers fill, `smallwebwaf` is still waiting on the client when the timeout runs out, and `408` is the right answer.
The tests run with a 300 ms timeout on a host where the test process is sometimes held up longer than that. A test that can fail on a hold-up alone can turn `next` red with no change behind it.
## What to do
Go through every test in `internal/proxy` that uses `shortTimeout` and make each one unable to fail on a hold-up of the test process alone, without weakening what it checks:
- where `SPEC.md` names the right answer for what actually happened, the test expects that answer, as https://git.eeqj.de/sneak/smallwebwaf/pulls/50 did for the "waiting on the client" cases;
- where a hold-up can only land in a step that sets up the case rather than in the behaviour under test (for example the upgrade itself, before the timeouts the test is about), make that step unable to run into the timeout.
Each test must still fail if `smallwebwaf` gets its rule wrong.
## Definition of done
- Every test in `internal/proxy` that uses `shortTimeout` is checked; the PR body lists any that needed no change, with one line on why.
- The tests pass in repeated 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
#55: the proxy timing tests now use a 5 s timeout that a hold-up of the test process cannot run out before the case is set up; the reading for each test is in the PR body.
Model: opus-5-5
https://git.eeqj.de/sneak/smallwebwaf/pulls/55: the proxy timing tests now use a 5 s timeout that a hold-up of the test process cannot run out before the case is set up; the reading for each test is in the PR body.
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.
make checkonnextfailed once more under heavy host load, on two timing tests ininternal/proxy, and passed when the same tests ran again seconds later:TestUpgradedConnectionOutlastsTheTimeouts: "read the answer to the upgrade: unexpected EOF". All four timeouts are 300 ms; if the test process is held up for 300 ms before the upgrade is answered, the timeout rightly runs out before the upgrade, and the test fails althoughsmallwebwafdid whatSPEC.mdasks.TestRequestTimeouts, case "upstream request timeout, waiting on the app":408where it wants504. This is the reverse of #49: if the client is held up before the app's buffers fill,smallwebwafis still waiting on the client when the timeout runs out, and408is the right answer.The tests run with a 300 ms timeout on a host where the test process is sometimes held up longer than that. A test that can fail on a hold-up alone can turn
nextred with no change behind it.What to do
Go through every test in
internal/proxythat usesshortTimeoutand make each one unable to fail on a hold-up of the test process alone, without weakening what it checks:SPEC.mdnames the right answer for what actually happened, the test expects that answer, as #50 did for the "waiting on the client" cases;Each test must still fail if
smallwebwafgets its rule wrong.Definition of done
internal/proxythat usesshortTimeoutis checked; the PR body lists any that needed no change, with one line on why.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
#55: the proxy timing tests now use a 5 s timeout that a hold-up of the test process cannot run out before the case is set up; the reading for each test is in the PR body.
Model: opus-5-5