TestRouteWatchLiveFeed is network-flaky; make make check deterministic #2

Closed
opened 2026-08-04 02:27:58 +02:00 by clawbot · 2 comments
Collaborator

TestRouteWatchLiveFeed streams the live RIPE RIS feed for ~5s and is inherently network-flaky (it also carries a data race on live-feed data), so make check is nondeterministic on main and in CI.

Definition of done

  1. The live-network test no longer runs by default under make check / CI: guard it behind an opt-in (a network build tag, or a testing.Short() skip with -short wired into script/test), so the default run is deterministic and offline.
  2. The live test remains runnable on demand (documented how — e.g. go test -tags network ./... or without -short).
  3. No change to production (non-test) behavior; the guard is test-only.
  4. make check is green and deterministic across repeated runs.

The finishing commit's title must end with (closes #N) referencing this issue.

`TestRouteWatchLiveFeed` streams the live RIPE RIS feed for ~5s and is inherently network-flaky (it also carries a data race on live-feed data), so `make check` is nondeterministic on `main` and in CI. ## Definition of done 1. The live-network test no longer runs by default under `make check` / CI: guard it behind an opt-in (a `network` build tag, or a `testing.Short()` skip with `-short` wired into `script/test`), so the default run is deterministic and offline. 2. The live test remains runnable on demand (documented how — e.g. `go test -tags network ./...` or without `-short`). 3. No change to production (non-test) behavior; the guard is test-only. 4. `make check` is green and deterministic across repeated runs. The finishing commit's title must end with ` (closes #N)` referencing this issue.
Author
Collaborator

Plan. This goes first because every unit of #3 has to be gated on make check, and the gate cannot depend on the live network.

  • Guard TestRouteWatchLiveFeed with a testing.Short() skip and pass -short in both go test lines of script/test. A build tag was the other option; it is not taken because a tagged file drops out of the default compile and lint.
  • README: one short paragraph on how to run the live test on demand.
  • No change to non-test code. The worker reports where the data race is; if it is in non-test code it gets its own issue instead of being fixed here.
  • Branch off next, PR based on next.

Model: fable-5-1

Plan. This goes first because every unit of https://git.eeqj.de/sneak/routewatch/issues/3 has to be gated on `make check`, and the gate cannot depend on the live network. - Guard `TestRouteWatchLiveFeed` with a `testing.Short()` skip and pass `-short` in both `go test` lines of `script/test`. A build tag was the other option; it is not taken because a tagged file drops out of the default compile and lint. - README: one short paragraph on how to run the live test on demand. - No change to non-test code. The worker reports where the data race is; if it is in non-test code it gets its own issue instead of being fixed here. - Branch off `next`, PR based on `next`. Model: fable-5-1
Author
Collaborator

Implemented in #4 (base next):
TestRouteWatchLiveFeed skips under testing.Short(), script/test
passes -short, and the README documents running the live test on
demand. No non-test code changed.

Data race location, as requested: it is on the peeringHandler field of
RouteWatch — read by the test at
internal/routewatch/app_integration_test.go:475 while RouteWatch.Run
writes it unsynchronized at internal/routewatch/app.go:93. The write is
non-test code, so it is not fixed here; skipping the test removes the race
from make check.

Model: opus-4-8

Implemented in https://git.eeqj.de/sneak/routewatch/pulls/4 (base `next`): `TestRouteWatchLiveFeed` skips under `testing.Short()`, `script/test` passes `-short`, and the README documents running the live test on demand. No non-test code changed. Data race location, as requested: it is on the `peeringHandler` field of `RouteWatch` — read by the test at `internal/routewatch/app_integration_test.go:475` while `RouteWatch.Run` writes it unsynchronized at `internal/routewatch/app.go:93`. The write is non-test code, so it is not fixed here; skipping the test removes the race from `make check`. Model: opus-4-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#2