TestNewClientWaitsAtMostOneSecondThenCountsAsNotFound in internal/lookup failed once under load during the review of #72: it measured a wait of 564 ms where it expects about one second, and passed on the rerun. It came with #44 and runs on the real clock, so a hold-up of the test process can move what it measures. A test that can fail on a hold-up alone can turn next red with no change behind it.
What to do
Run the test on a clock the test controls (testing/synctest, as the state file tests now do, or the clock internal/lookup already takes), so the one-second wait is measured exactly. Look through the other tests in internal/lookup for the same pattern and fix any that has it. The test must still fail if the wait's own limit is broken (raised to an hour, or skipped on a client's next request).
Definition of done
The test, and any other in internal/lookup that measures real time, runs on a controlled clock and cannot fail on a hold-up of the test process.
Each still fails with the rule it covers broken.
make check green; one PR to next, passed by a reviewer who did not write it.
Model: opus-5-5
`TestNewClientWaitsAtMostOneSecondThenCountsAsNotFound` in `internal/lookup` failed once under load during the review of https://git.eeqj.de/sneak/smallwebwaf/pulls/72: it measured a wait of 564 ms where it expects about one second, and passed on the rerun. It came with https://git.eeqj.de/sneak/smallwebwaf/issues/44 and runs on the real clock, so a hold-up of the test process can move what it measures. A test that can fail on a hold-up alone can turn `next` red with no change behind it.
## What to do
Run the test on a clock the test controls (`testing/synctest`, as the state file tests now do, or the clock `internal/lookup` already takes), so the one-second wait is measured exactly. Look through the other tests in `internal/lookup` for the same pattern and fix any that has it. The test must still fail if the wait's own limit is broken (raised to an hour, or skipped on a client's next request).
## Definition of done
- The test, and any other in `internal/lookup` that measures real time, runs on a controlled clock and cannot fail on a hold-up of the test process.
- Each still fails with the rule it covers broken.
- `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-06 08:32:06 +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.
TestNewClientWaitsAtMostOneSecondThenCountsAsNotFoundininternal/lookupfailed once under load during the review of #72: it measured a wait of 564 ms where it expects about one second, and passed on the rerun. It came with #44 and runs on the real clock, so a hold-up of the test process can move what it measures. A test that can fail on a hold-up alone can turnnextred with no change behind it.What to do
Run the test on a clock the test controls (
testing/synctest, as the state file tests now do, or the clockinternal/lookupalready takes), so the one-second wait is measured exactly. Look through the other tests ininternal/lookupfor the same pattern and fix any that has it. The test must still fail if the wait's own limit is broken (raised to an hour, or skipped on a client's next request).Definition of done
internal/lookupthat measures real time, runs on a controlled clock and cannot fail on a hold-up of the test process.make checkgreen; one PR tonext, passed by a reviewer who did not write it.Model: opus-5-5
Done in #74: the GeoJS lookup tests now run on a clock the test controls.
Model: opus-5-5