offline.e2e.ts flakes in full runs #93

Closed
opened 2026-11-08 18:11:34 +00:00 by chris-kreidl · 1 comment
chris-kreidl commented 2026-11-08 18:11:34 +00:00 (Migrated from github.com)

(session 40) offline.e2e.ts failed in two of four full runs late in the session (the queued strength log already on the server before the test's sync), always passed alone or beside its neighbours (keyboard, new-build), and passed on the branch's earlier commit. It looks like load-dependent timing between setOffline and the write queue, not this branch's ride or Settings work; make the test wait for the service worker to report offline before saving if it keeps failing.

Also: (CSRF fix) offline.e2e.ts failed once in a full run: a strength log was already on the server right after the offline reload (line 70). It passed alone three times running; a CSRF check can only refuse writes. Watch for a repeat, with the other one-off full-run failures below.

Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08.

(session 40) `offline.e2e.ts` failed in two of four full runs late in the session (the queued strength log already on the server before the test's sync), always passed alone or beside its neighbours (`keyboard`, `new-build`), and passed on the branch's earlier commit. It looks like load-dependent timing between `setOffline` and the write queue, not this branch's ride or Settings work; make the test wait for the service worker to report offline before saving if it keeps failing. Also: (CSRF fix) `offline.e2e.ts` failed once in a full run: a strength log was already on the server right after the offline reload (line 70). It passed alone three times running; a CSRF check can only refuse writes. Watch for a repeat, with the other one-off full-run failures below. _Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08._
chris-kreidl commented 2026-11-08 20:14:42 +00:00 (Migrated from github.com)

What this is about. An end-to-end test (e2e/offline.e2e.ts) that goes offline, logs a session, reloads and checks it syncs exactly once on reconnect. It failed now and then in full test runs (passing alone): the logged session was already on the server before the test expected it. That looks like timing between going offline and the write queue under load, not a real bug.

Status (checked 2026-11-08): the test still logs a strength session. Session 55 (#232) removes strength, so it must rewrite this test around a hand-logged ride. While doing that, wait for the service worker to report offline before saving, which should fix the flake.

**What this is about.** An end-to-end test (`e2e/offline.e2e.ts`) that goes offline, logs a session, reloads and checks it syncs exactly once on reconnect. It failed now and then in full test runs (passing alone): the logged session was already on the server before the test expected it. That looks like timing between going offline and the write queue under load, not a real bug. **Status (checked 2026-11-08):** the test still logs a *strength* session. Session 55 (#232) removes strength, so it must rewrite this test around a hand-logged ride. While doing that, wait for the service worker to report offline before saving, which should fix the flake.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/trainer#93
No description provided.