e2e teardown races background re-plan work (FK violation) #185

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

(session 29) A full e2e run logged one [replan] missed-session check failed with a MissedSession_userId_fkey violation: a flow's afterAll deleted its throwaway user while the background check started by a log write (here likely the ride delete in corrections.e2e.ts) was still running. Caught and logged; every flow passed. Test teardown only; wait for idle re-plan work before deleting users if the noise matters.

Moved from docs/history.md → Parked follow-ups on 2026-11-08.

(session 29) A full e2e run logged one `[replan] missed-session check failed` with a `MissedSession_userId_fkey` violation: a flow's `afterAll` deleted its throwaway user while the background check started by a log write (here likely the ride delete in `corrections.e2e.ts`) was still running. Caught and logged; every flow passed. Test teardown only; wait for idle re-plan work before deleting users if the noise matters. _Moved from docs/history.md → Parked follow-ups on 2026-11-08._
chris-kreidl commented 2026-11-08 20:19:48 +00:00 (Migrated from github.com)

What this is about. Test noise. Each end-to-end test file makes a throwaway user and deletes it at the end. Sometimes a background job the test started (e.g. the missed-session check after deleting a ride) is still running when the user is deleted, and it logs a foreign-key error. The job catches it, and every test passes.

Status (checked 2026-11-08): as described.

Fix if the log noise matters: wait for background work to finish before deleting the test user. Low priority.

**What this is about.** Test noise. Each end-to-end test file makes a throwaway user and deletes it at the end. Sometimes a background job the test started (e.g. the missed-session check after deleting a ride) is still running when the user is deleted, and it logs a foreign-key error. The job catches it, and every test passes. **Status (checked 2026-11-08):** as described. **Fix if the log noise matters:** wait for background work to finish before deleting the test user. Low priority.
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#185
No description provided.