Repository navigation
fix(e2e): ride out dev-server stalls in sign-in; await the profile save before reloading - #105
Merged
Merged
Conversation
…ve before reloading
Jenkins build 191 failed on one spec and flagged five as flaky. Every failure
lined up with two windows where the next dev server stalled for up to 30 s per
request (Turbopack cache compaction), plus one genuine race.
- discovery.spec: the e-mail switch flips optimistically before its PATCH lands,
and the test reloaded straight away, aborting the save ("client disconnected"
for /api/profile) so the reload read the old value. It now waits for the
PATCH response before reloading.
- helpers/auth signIn: the whole sign-in is retried (up to 100 s), not just the
panel load. Each attempt waits for the account menu or the dev panel; if the
menu is already there, an earlier slow callback landed and the persona is not
posted again (which would re-seed it, e.g. reset fresh onboarding).
- public-submissions.spec: the two end-to-end flows (submit/confirm/accept and
Specific people) get test.slow(); the Specific-people flow cannot fit 120 s on
a stalled server and failed all three attempts.
Test-only: no version bump, no changelog entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three e2e fixes from Jenkins build 191, which failed on one spec and flagged five as flaky. Test only, so there's no version bump and no changelog entry.
Why
Every failure lined up with two windows where the
next devserver stalled. Single requests took 15–32 s, the watchdog's 5 s health probe timed out, and Turbopack logged a 10 s "filesystem cache database compaction". Three tests failed in the same second at the end of the first stall. On top of that, one test had a genuine race.The noise in the server log is not related. The many
/api/users/:id/photo404s are the gateway working as specified: dev personas have no Entra photo. TheuncaughtException: Error: aborted (ECONNRESET)blocks are a known Next.js bug (vercel/next.js#84649, #99278), and the server only logs them and keeps running.Changes
e2e/discovery.spec.ts: the profile's e-mail switch flips optimistically before itsPATCH /api/profilelands. The test reloaded right after the click, which aborted the save (the server loggedclient disconnectedfor/api/profile), so the reload read the old value. It now waits for the PATCH response before reloading.e2e/helpers/auth.ts(signIn): the whole sign-in is now retried, for up to 100 s, not just the panel load..user-triggerwas the most common failure point, since every test signs in.e2e/public-submissions.spec.ts: the two end-to-end flows (submit → confirm → accept, and Specific people) calltest.slow(), the same convention the directory-card and admin-settings specs use.platform-stateproject, so its first retry was skipped behind the preceding test's timeout and its second landed in the next stall.Reviewer notes
tsc --strict, checked separately) andplaywright test --listloads every affected spec.pnpm typecheckdoes not seee2e/(the web tsconfig includes onlysrc), and ESLint ignorese2e/too. A type error in a spec would only show up when Playwright transpiles it.e2e-host-stats.logfrom build 191 would confirm that.