e2e: specs that mkdtemp at module level leak a temp dir per run #62

Closed
opened 2026-10-02 12:10:04 +00:00 by jhgaylor · 1 comment
Owner

Found during #55 (M27).

Playwright loads each spec module in the runner process as well as the worker, so a top-level mkdtempSync(...) makes a directory the spec's afterAll never removes. /tmp on geek has dozens: ilg-e2e-ports-* (browser-ports.spec.ts), ilg-e2e-vite-*, ilg-e2e-vmdev-* (vm-dev-server.spec.ts), ilg-e2e-tm-*, and others.

Fix: make them in beforeAll (as editors.spec.ts does), or remove both in a global teardown.

Found during #55 (M27). Playwright loads each spec module in the runner process as well as the worker, so a top-level `mkdtempSync(...)` makes a directory the spec's `afterAll` never removes. /tmp on geek has dozens: `ilg-e2e-ports-*` (browser-ports.spec.ts), `ilg-e2e-vite-*`, `ilg-e2e-vmdev-*` (vm-dev-server.spec.ts), `ilg-e2e-tm-*`, and others. Fix: make them in `beforeAll` (as `editors.spec.ts` does), or remove both in a global teardown.
Author
Owner

Fixed in af36338: module-level temp dirs moved into beforeAll with cleanup; playwright.config's state and IDE dirs are removed on exit. Rust tests' leftover state dirs are #68.

Fixed in af36338: module-level temp dirs moved into beforeAll with cleanup; playwright.config's state and IDE dirs are removed on exit. Rust tests' leftover state dirs are #68.
jhgaylor referenced this issue from a commit 2026-10-02 17:01:03 +00:00
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#62
No description provided.