From 88af769d459b8126a600e6a4ef629b932bd6e4b0 Mon Sep 17 00:00:00 2001 From: Niek Otten Date: Wed, 22 Jul 2026 13:26:34 +0200 Subject: [PATCH] fix(e2e): run Playwright single-worker to stop OOM page-crash in verify-stack (refs #115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit verify-stack intermittently failed on the e2e with "Page crashed" mid-action: Playwright defaulted to 2 workers, so two full chromium browsers ran alongside the whole compose stack on the 8 GB runner and the renderer was OOM-killed. Pin workers: 1 (only two long-running happy-path specs) and add --disable-dev-shm-usage, removing the memory contention rather than masking it with retries (CLAUDE.md §15). Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/e2e/playwright.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/e2e/playwright.config.ts b/tests/e2e/playwright.config.ts index 4423a77..85be0a2 100644 --- a/tests/e2e/playwright.config.ts +++ b/tests/e2e/playwright.config.ts @@ -12,6 +12,12 @@ export default defineConfig({ timeout: 90_000, expect: { timeout: 15_000 }, retries: 1, + // Run the specs serially. Each spec drives a full `channel: 'chromium'` browser, and the e2e + // shares an 8 GB runner with the entire compose stack (OpenZaak, NRC, Keycloak, Flowable, 4× + // Postgres, every service + 3 portals). Two parallel browsers exhaust memory and the renderer is + // OOM-killed mid-action ("Page crashed") — fixing the flakiness at its source rather than leaning + // on `retries` (CLAUDE.md §15). Only two long-running happy-path specs, so serial costs little. + workers: 1, reporter: [['list']], use: { baseURL, @@ -26,7 +32,13 @@ export default defineConfig({ // headless), not Playwright's default headless-shell, so pin `channel: 'chromium'`. channel: 'chromium', launchOptions: { - args: [`--unsafely-treat-insecure-origin-as-secure=${baseURL},${behandelURL}`], + args: [ + `--unsafely-treat-insecure-origin-as-secure=${baseURL},${behandelURL}`, + // Write Chromium's shared memory to /tmp instead of the container's small /dev/shm, so a + // large DOM/heap can't crash the renderer on the memory-constrained runner (belt-and-braces + // alongside the single worker above). + '--disable-dev-shm-usage', + ], }, }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],