Skip to content

Flaky: 100-row paged-list tests time out under CI load (ExpensesPage, CustomersPage) #557

Description

@mforce

Symptom

src/routes/ExpensesPage.test.tsx > ExpensesPage pagination > appends the next page when 'load more' is clicked (offset advances by a full page) intermittently fails with Test timed out in 5000ms on CI.

Observed on main run 32155208344 (commit 4148f9b, the #271/#555 merge — a backend-only PR touching no web/ files, so pre-existing flake, not a regression). 1778/1779 web tests passed; the prior commit's CI was green.

Likely cause

Async paged-list load race — the 5s default Vitest timeout is too tight under a loaded runner. Same shape as the paged-list/optimistic-UI races (usePagedList, prefill-wipe / async-intent-ticket patterns).

Fix

Make it deterministic, not timing-dependent: wait on the concrete post-load state (appended rows / 'load more' re-enabling) rather than racing the async load; raise this test's timeout only if needed. Do NOT just bump the global timeout — pin the actual awaited side effect. Confirm under repeated / artificially-loaded runs.

Verify

cd web && npm test -- ExpensesPage green across repeated runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendReact/Vite web clientbugSomething isn't workingseverity:p4Defect: tooling, CI noise or test gap; no user impact

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions