Make the frontend tests independent of runner load #425
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci-frozen-parse-clock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #404.
frontend-testfailed in 14 of the last 85 runs. The failed first attempts could still be read through the job view in the web UI (the raw log download returns a 500 for them). Here is what failed:quoteBar.test.ts"marks a quote the initial parse did not reach"hideMarkers.test.ts)UnreadMessageList.test.ts"stops loading further unread at the window ceiling" (timeout at 5000ms)setup-node(TLS disconnect)The failure was always an assertion or a timeout, never a crash, and always a test that depends on the clock.
CodeMirror parse budget. CodeMirror stops parsing when a
Date.now()budget runs out: 20ms when a state is created, 50ms inensureSyntaxTree. On a busy runner the tree stops short, andquoteLinessees no quote at line 400. A clock that jumps 30ms per call reproduces the exact CI error (expected [] to have a length of 1 but got +0); with a frozen clock the test passes. The seven test files that read a parse tree now freezeDateper test (vi.useFakeTimers({ toFake: ['Date'] })). Parsing then stops only on its character limits, so the test still exercises the "initial parse stops at 3000 characters" case it is named after.UnreadMessageList.test.ts. The fixtures are timed against aNOWpinned at module load, but the component formats "40 min geleden" against the real clock. Once the file had run for more than a minute, the label read "41 min geleden"; setting the clock toNOW + 61sreproduces it.Dateis now frozen atNOW. The window-ceiling test renders a full 200-message window (MAX_UNREAD_WINDOW) eight times: 3.1s at load 12, against the 5s default. It gets 20s instead of a smaller window, because hitting the real ceiling is the point of the test.Test-only change, so no CHANGELOG entry.
Not fixed: in one local run at load 22,
SortableSection.test.ts"scrolls a card hanging off the bottom back into view after an Alt-move" also failed once. It is not among the CI failures and I could not reproduce it (a 30ms stall aroundafterMovepasses), so it is left alone. If it shows up in CI, its log is the place to start.3173f087494e1af240b34e1af240b30baf4162580baf4162581c63b3450c1c63b3450c2796f6fb862796f6fb8646921bf169