Skip to content

test: fix flaky cross-process wait test and root-proof the unusable dir test - #160

Merged
akirilyuk merged 1 commit into
mainfrom
fix/vitest-workers-test-flake
Nov 9, 2026
Merged

akirilyuk merged 1 commit into
mainfrom
fix/vitest-workers-test-flake

Conversation

@akirilyuk

Copy link
Copy Markdown
Contributor

Test-only change to vitest.workers.test.ts.

  • "a second process waits until the first exits" asserted GOT 6, but the first process frees its slots one at a time and the polling process may take the ones already free. It now accepts a grant of 1 to 6 and checks on-disk ownership.
  • New test: a second process started after a killed holder is reaped takes all 6.
  • The unusable-dir test used chmod 0o500, which does not stop root. It now uses a path below a regular file (ENOTDIR for every user).

…ir test

The waiting process may take the slots already freed, so the wait test accepts a grant of 1 to 6 and checks on-disk ownership. The kill test starts the second process after the holder is reaped. The unusable-dir test uses a path below a regular file, which fails with ENOTDIR for every user.
@akirilyuk
akirilyuk merged commit af04ed1 into main Nov 9, 2026
9 checks passed
@akirilyuk
akirilyuk deleted the fix/vitest-workers-test-flake branch November 9, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant