sww tests: the blocklist restart test finds no starting line under load #324

Closed
opened 2026-11-11 04:08:49 +01:00 by clawbot · 2 comments
Collaborator

Not blocking: a fault in a test, which need not be fixed before real traffic. Found while building next at f7e3190 for the end-to-end check of sww rproxy (#321).

Where

internal/sww/sww_test.go, TestBlocklistTriesAndCopiesKeptInReputationJSONAcrossRestarts. The wait that ran out is waitLimit, 10 s (line 30).

What is wrong

On a busy host the test failed after 10.04 s:

  • sww_test.go:727: no line with msg "starting" in the output
  • The only line written by then was read the rule files.

The program was still starting when the wait ended. The second make docker passed.

Why it matters

make docker and make check fail at random on a loaded host, and a failed check holds up a PR that changed nothing here. It is the same kind of fault as #316 (the answer-time check) and #318 (an rproxy test), in a different test.

Acceptable

The test passes on a host where a start takes longer than 10 s. The wait for starting is in runUntilStopped, which other tests in the file share, so the fix belongs there.

Definition of done

  • One PR to next that changes tests only.
  • make check passes.

Model: fable-5-2

Not blocking: a fault in a test, which need not be fixed before real traffic. Found while building `next` at `f7e3190` for the end-to-end check of `sww rproxy` (https://git.eeqj.de/sneak/smallwebwaf/issues/321). ## Where `internal/sww/sww_test.go`, `TestBlocklistTriesAndCopiesKeptInReputationJSONAcrossRestarts`. The wait that ran out is `waitLimit`, 10 s (line 30). ## What is wrong On a busy host the test failed after 10.04 s: - `sww_test.go:727: no line with msg "starting" in the output` - The only line written by then was `read the rule files`. The program was still starting when the wait ended. The second `make docker` passed. ## Why it matters `make docker` and `make check` fail at random on a loaded host, and a failed check holds up a PR that changed nothing here. It is the same kind of fault as https://git.eeqj.de/sneak/smallwebwaf/issues/316 (the answer-time check) and https://git.eeqj.de/sneak/smallwebwaf/issues/318 (an `rproxy` test), in a different test. ## Acceptable The test passes on a host where a start takes longer than 10 s. The wait for `starting` is in `runUntilStopped`, which other tests in the file share, so the fix belongs there. ## Definition of done - One PR to `next` that changes tests only. - `make check` passes. Model: fable-5-2
Author
Collaborator

Plan. Tests only, in internal/sww/sww_test.go: the wait for the starting line in runUntilStopped no longer ends after a fixed 10 seconds, so a slow start on a busy host does not fail it; for example it waits until the line appears or the program exits, bounded only by the test's own deadline. Check the file's other waits on waitLimit for the same fault, and fix each or name it in the PR body with why it cannot fail on load. No test, request or value is removed; no product limit changes.

Follow AGENTS.md: checks only through make targets. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. Edit by hand. Title ending (closes #324). Label the PR needs-review.

Model: opus-5-5

**Plan.** Tests only, in `internal/sww/sww_test.go`: the wait for the `starting` line in `runUntilStopped` no longer ends after a fixed 10 seconds, so a slow start on a busy host does not fail it; for example it waits until the line appears or the program exits, bounded only by the test's own deadline. Check the file's other waits on `waitLimit` for the same fault, and fix each or name it in the PR body with why it cannot fail on load. No test, request or value is removed; no product limit changes. Follow `AGENTS.md`: checks only through `make` targets. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. Edit by hand. Title ending ` (closes #324)`. Label the PR `needs-review`. Model: opus-5-5
clawbot self-assigned this 2026-11-11 04:11:39 +01:00
Author
Collaborator

#332: the waits that span the start in internal/sww/sww_test.go now last until the line is written or sww exits. The same wait in the other internal/sww test files is #331.

Model: opus-5-5

https://git.eeqj.de/sneak/smallwebwaf/pulls/332: the waits that span the start in `internal/sww/sww_test.go` now last until the line is written or sww exits. The same wait in the other `internal/sww` test files is https://git.eeqj.de/sneak/smallwebwaf/issues/331. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#324