// Reap fixture strays left by an EARLIER run before this one starts. // // A run killed with SIGKILL (Ctrl-C twice, `timeout`, an OOM) never gets to run // its own globalTeardown, so its strays are still burning CPU when the next run // begins. That is precisely how 27 of them once accumulated and turned a // 30-minute suite into a 1.3-hour one whose 13 failures were pure contention. // // ORDERING CAVEAT: Playwright starts the `webServer` entries BEFORE globalSetup // (the same constraint export/e2e-2origin/globalSetup.ts documents at :151-152). // So this cannot clear a stale dev server ahead of the new one booting — it only // reaps fixture children, which is what actually eats the CPU. import { dropTestExportOutLink } from "./exportOutLink"; import { sweepFixtureProcesses } from "./fixtureProcs"; export default async function globalSetup() { await sweepFixtureProcesses("setup"); await dropTestExportOutLink("setup"); }