Skip to content

Commit 27098e0

Browse files
committed
fix(e2e): adjust Playwright workers and timeout headroom for Windows CI
On 2-vCPU Windows CI runners (windows-latest), running 5 parallel Chromium browsers under load caused extreme CPU starvation during Shiki WASM Web Worker compilation and diff rendering. As a result, element visibility assertions in specs like session-timeline-file-projection.spec.ts took 8-12s, hitting the 10s expect timeout and causing chronic flaky failures (#189). Scale workers on Windows CI to 3 to alleviate CPU starvation, and increase expect timeout to 25s (and test timeout to 90s) on Windows to provide adaptive headroom per packages/app/e2e/AGENTS.md guidelines.
1 parent f8f179a commit 27098e0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/app/playwright.config.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ const serverHost = process.env.PLAYWRIGHT_SERVER_HOST ?? "127.0.0.1"
66
const serverPort = process.env.PLAYWRIGHT_SERVER_PORT ?? "4096"
77
const command = `bun run dev -- --host 0.0.0.0 --port ${port}`
88
const reuse = !process.env.CI
9-
const workers = Number(process.env.PLAYWRIGHT_WORKERS ?? (process.env.CI ? 5 : 0)) || undefined
9+
const isWindows = process.platform === "win32"
10+
const workers = Number(
11+
process.env.PLAYWRIGHT_WORKERS ?? (process.env.CI ? (isWindows ? 3 : 5) : 0),
12+
) || undefined
1013
export default defineConfig({
1114
testDir: "./e2e",
1215
testIgnore: process.env.OPENCODE_PERFORMANCE === "1" ? "performance/**/*.test.ts" : "performance/**",
1316
outputDir: "./e2e/test-results",
14-
timeout: 60_000,
17+
timeout: isWindows ? 90_000 : 60_000,
1518
expect: {
16-
timeout: 10_000,
19+
timeout: isWindows ? 25_000 : 10_000,
1720
},
1821
fullyParallel: process.env.PLAYWRIGHT_FULLY_PARALLEL === "1",
1922
forbidOnly: !!process.env.CI,

0 commit comments

Comments
 (0)