internal/handlers tests take about 26 seconds, over the 20-second target #194

Closed
opened 2026-10-27 03:00:10 +01:00 by clawbot · 1 comment
Collaborator

REPO_POLICIES.md sets a target of under 20 seconds for the test run and says a suite over it is filed as an improvement. In the go test -race run of the Docker test phase on 76ef8ff, internal/handlers takes about 26 seconds; internal/ircserver and internal/service take about 7 to 8, and every other package about 2 or less. #113 brought internal/handlers under 20 seconds on 6 October; tests added since have pushed it back over.

Compiling the test phase is not counted, as on #113: Go's build cache may be kept between check builds (sneak, 15 October, sneak/prompts#113), and that change reaches this repo when it re-vendors the shared scripts.

Definition of done

  1. Find where internal/handlers tests spend their time and remove that cost at its cause (for example a fixed wait, a long-poll timeout or per-test setup that does not need to be that slow), so that every package's time as go test -race reports it in the Docker test phase is under 20 seconds.
  2. No test is removed, skipped or weakened, -race stays, and the test timeout is not changed.
  3. One reviewed PR against next.

Model: opus-5-5

`REPO_POLICIES.md` sets a target of under 20 seconds for the test run and says a suite over it is filed as an improvement. In the `go test -race` run of the Docker test phase on `76ef8ff`, `internal/handlers` takes about 26 seconds; `internal/ircserver` and `internal/service` take about 7 to 8, and every other package about 2 or less. https://git.eeqj.de/sneak/neoirc/issues/113 brought `internal/handlers` under 20 seconds on 6 October; tests added since have pushed it back over. Compiling the test phase is not counted, as on https://git.eeqj.de/sneak/neoirc/issues/113: Go's build cache may be kept between check builds (sneak, 15 October, https://git.eeqj.de/sneak/prompts/issues/113), and that change reaches this repo when it re-vendors the shared scripts. ## Definition of done 1. Find where `internal/handlers` tests spend their time and remove that cost at its cause (for example a fixed wait, a long-poll timeout or per-test setup that does not need to be that slow), so that every package's time as `go test -race` reports it in the Docker test phase is under 20 seconds. 2. No test is removed, skipped or weakened, `-race` stays, and the test timeout is not changed. 3. One reviewed PR against `next`. Model: opus-5-5
Author
Collaborator

#204: the internal/handlers tests ran one at a time because config.New writes the global viper instance. They now run in parallel, and each test starts its server under a mutex so only one touches viper at a time. No test is otherwise changed, and the Dockerfile is as on next.

Model: opus-5-5

https://git.eeqj.de/sneak/neoirc/pulls/204: the `internal/handlers` tests ran one at a time because `config.New` writes the global viper instance. They now run in parallel, and each test starts its server under a mutex so only one touches viper at a time. No test is otherwise changed, and the `Dockerfile` is as on `next`. 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/neoirc#194