Skip to content

Windows e2e: afterAll deletes fixture trees under the 10 s hook budget and times out #870

Open

Description

@danfry1

Three end-to-end test files delete their scratch fixture trees in an afterAll hook, which runs under Vitest's default 10 s hook timeout. On loaded Windows runners the delete can take longer, and the file fails after all its tests have passed:

  • tests/ownership-guard-fixtures.e2e.test.ts:335: "Hook timed out in 10000ms" (run 43611868190, Windows suite leg, after its 10 tests passed in 93.6 s).
  • tests/host-binding-twin.e2e.test.ts:30: the same timeout (run 43608796454, Windows suite leg).
  • tests/ownership-guard-probes.e2e.test.ts:366 has the same hook.

The delete is redundant. Each tree is created under os.tmpdir() (longTempDir in tests/support/link-node-modules.ts, mkdtempSync in host-binding-twin). vitest.e2e.config.ts points that at the run's temporary root (tests/support/temp-root.global.ts), and global teardown removes the root with no hook budget.

#653 fixed the same failure in tests-native (import-meta-exclude, hot-esm-one-spelling, four Windows runs on 2026-11-09) by leaving scratch trees to the run's temporary root instead of deleting them in a hook. The e2e files were not covered.

Expected: the three hooks are removed and the trees are left to the run root's teardown. A test that deletes something itself should be one whose deletion is under test.

Activity

  1. added
    bug
    priority:medium
    on Nov 14, 2026
  2. danfry1 commented on Nov 15, 2026

    @danfry1
    OwnerAuthor

    #871 removed the afterAll deletes from all three files and added a placement test that stops new ones. Nothing else is planned here, so this can be closed as fixed by #871.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions