| 1 | // The live suite's worker performs per-request `caches.default` lookups, |
| 2 | // which miniflare implements via loopback connections to its Node-side blob |
| 3 | // store. On the small Windows CI runner the job's cumulative socket churn |
| 4 | // (chromium + workerd + miniflare loopback; TIME_WAIT is ~2 minutes there) |
| 5 | // exhausts AFD buffer space by the time this suite runs — workerd fails with |
| 6 | // `bind(): WSAENOBUFS` / `ConnectEx(): ERROR_DUP_NAME` and SSR requests 500. |
| 7 | // cloudflare-runtime's own contributions were fixed (bounded retries, |
| 8 | // keep-alive loopback servers, no unspecified connect targets); the residual |
| 9 | // churn is outside this repo. Skip on Windows CI only. |
| 10 | // |
| 11 | // Re-validated 2026-08-04 with two controlled CI experiments on the |
| 12 | // test/sveltekit-windows-ungate branch: (1) running this fixture ISOLATED |
| 13 | // (nothing before it) still fails 11/26 with `bind(0.0.0.0:0)` WSAENOBUFS; |
| 14 | // (2) widening the dynamic port range to 64k (`netsh int ipv4 set |
| 15 | // dynamicport tcp start=1025 num=64510`, verified applied) does not help — |
| 16 | // the exhaustion is kernel buffer space (AFD/nonpaged pool), not the |
| 17 | // ephemeral-port range. This is a runner-capacity limitation, not a bug |
| 18 | // this repo can fix; the next lever would be connection reuse inside |
| 19 | // miniflare's loopback blob-store client (upstream). |
| 20 | import { execSync } from "node:child_process"; |
| 21 | |
| 22 | if (process.platform === "win32" && process.env.CI) { |
| 23 | console.log( |
| 24 | "packages/frontend-frameworks/fixtures/sveltekit e2e skipped on Windows CI: runner-level socket exhaustion (see scripts/e2e.mjs).", |
| 25 | ); |
| 26 | process.exit(0); |
| 27 | } |
| 28 | |
| 29 | // `bun run` puts the fixture's node_modules/.bin on PATH for playwright. |
| 30 | execSync("bun run test:e2e", { stdio: "inherit" }); |