Flaky web test: 'stops Libraries scan polling and refreshes sources once when scans complete' (App.test.tsx) #157

Closed
opened 2026-07-07 13:05:55 +02:00 by timothy · 1 comment
Owner

Main run 562 (commit 22fa3ecb, 2026-07-07) failed in the image-build web test stage: the #88 Libraries scan-polling test expected the progress label to disappear and found 75% still rendered (waitFor → toBeInTheDocument, failed at ~1045ms). 5/5 consecutive local runs of App.test.tsx on the same commit pass — timing flake under loaded CI runner, likely the waitFor default timeout racing the poll interval.

First observed after #140 grew App.test.tsx to 112 tests (more contention in the same file). Fix ideas: fake timers for the poll loop, or a generous explicit waitFor timeout on that assertion.

Retriggered via empty commit. If it recurs, prioritize.

Main run 562 (commit 22fa3ecb, 2026-07-07) failed in the image-build web test stage: the #88 Libraries scan-polling test expected the progress label to disappear and found `75%` still rendered (waitFor → toBeInTheDocument, failed at ~1045ms). 5/5 consecutive local runs of App.test.tsx on the same commit pass — timing flake under loaded CI runner, likely the waitFor default timeout racing the poll interval. First observed after #140 grew App.test.tsx to 112 tests (more contention in the same file). Fix ideas: fake timers for the poll loop, or a generous explicit waitFor timeout on that assertion. Retriggered via empty commit. If it recurs, prioritize.
Author
Owner

Two more occurrences on main today (2026-07-07), both in the same Libraries scan-polling family in web/src/App.test.tsx:

  • run 569 (post-#166 merge): fetches Libraries data as a route delta and does not poll sourcesexpected 1 to be greater than 1 at App.test.tsx:1280.
  • run 573 (post-#167 merge): stops Libraries scan polling and refreshes sources once when scans complete — progress label 75% still in document at App.test.tsx:1317.

Both passed on the identical code in PR CI and on retrigger, and the second one also flaked once locally during the #167 reconcile verification (passed on rerun). Looks like timer/polling teardown raciness under load rather than anything commit-specific. Frequency is now ~2 flakes/day of merges — worth prioritizing: likely fixes are fake timers for the polling hooks or waitFor-based assertions instead of immediate not.toBeInTheDocument().

Two more occurrences on main today (2026-07-07), both in the same Libraries scan-polling family in `web/src/App.test.tsx`: - run 569 (post-#166 merge): `fetches Libraries data as a route delta and does not poll sources` — `expected 1 to be greater than 1` at App.test.tsx:1280. - run 573 (post-#167 merge): `stops Libraries scan polling and refreshes sources once when scans complete` — progress label `75%` still in document at App.test.tsx:1317. Both passed on the identical code in PR CI and on retrigger, and the second one also flaked once locally during the #167 reconcile verification (passed on rerun). Looks like timer/polling teardown raciness under load rather than anything commit-specific. Frequency is now ~2 flakes/day of merges — worth prioritizing: likely fixes are fake timers for the polling hooks or `waitFor`-based assertions instead of immediate `not.toBeInTheDocument()`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#157