test(e2e): a localhost connect the machine dropped is tried again on the test side
On a Windows host a burst of test traffic can drop a loopback connect now and then (every port, any program — measured on the dev desktop). The browser resends it and only waits; Node (libuv) sends a loopback SYN once and fails at ~300 ms with "connect ETIMEDOUT". `e2e/retryConnect.ts` wraps Playwright's request context so that one error is tried again (0.5 / 1 / 2 / 4 / 8 s, the system's own retry waits) while every other failure goes straight to the test; global.setup's health check, login and /api/me and speed.measure's share probe go through it. Unit-tested; e2e 61/61.
This commit is contained in:
@@ -17,6 +17,13 @@ siftlode e2e-seed # (re)seed the test account only, no tests
|
||||
The localdev stack must be up (`siftlode dev`). `global.setup.ts` reseeds the account and logs in
|
||||
once, sharing the session via `e2e/.auth/state.json` (git-ignored).
|
||||
|
||||
**A dropped localhost connect** — on a Windows host, a burst of test traffic can drop a loopback
|
||||
connect now and then (every port, any program). The browser resends it and only waits (a loader
|
||||
outlives an `expect` timeout); Node does not, so a request from the test side fails with
|
||||
`connect ETIMEDOUT`. Those requests go through `retryConnect` (`e2e/retryConnect.ts`), which tries
|
||||
that one error again and passes every other failure straight on. Don't run two e2e suites on the
|
||||
same machine at once.
|
||||
|
||||
**Browsers** — every flow runs in three projects: `chromium` (Desktop Chrome), `webkit` (Desktop
|
||||
Safari) and `ipad` (iPad gen 7 landscape: 1080×810, touch, mobile). Install the engines once per
|
||||
machine with `npx playwright install chromium webkit`; run one project with
|
||||
|
||||
Reference in New Issue
Block a user