commit 750c0ba195acbf607811cf80fb91fa4573ea22ac
parent baaebb8639aac1c7468393298a158f75a30efdd5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 28 Sep 2026 12:36:14 -0400
export: the 2origin config stages the two origins only in the runner, not again in every worker
Playwright evaluates a config again in each worker process (TEST_WORKER_INDEX
is set there before it loads), and every evaluation re-ran stageTwoOrigins(),
which deletes and rewrites .2origin/originB under the serve already serving
it. Guarded on TEST_WORKER_INDEX.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/export/playwright.2origin.config.ts b/export/playwright.2origin.config.ts
@@ -20,7 +20,10 @@ const B_PORT = portFor("ORIGIN_B_PORT");
const A_PORT = portFor("HUB_A_PORT");
const baseURL = `http://localhost:${A_PORT}`;
-stageTwoOrigins();
+// Stage once, in the runner. Playwright evaluates this config again in every
+// worker process (it sets TEST_WORKER_INDEX there before loading it), and a
+// re-stage deletes and rewrites originB under the `serve` already serving it.
+if (!process.env.TEST_WORKER_INDEX) stageTwoOrigins();
export default defineConfig({
testDir: "./e2e-2origin",