Repository navigation
test: cleanup of planted node copies retries a Windows EBUSY - #68
Merged
Merged
Conversation
…t-run copy of node (EBUSY) CI failed in the file's afterAll hook: EBUSY on the temp .exe. Nothing the tests assert changes.
…roc.test.ts's planted node too (review) vitest's 10 s hookTimeout bounds the budget: 6 × 200 ms is 4.2 s, inside twice. proc.test.ts's afterAll had the same exposure.
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main(windows-latest · node 22) failed intest/local-bin.test.ts'safterAll:EBUSYunlinking the planted copy of node (craftar-fake-bin-tool.exe), with every test passing. Windows can keep a just-run executable locked for a moment.test/helpers/fs.ts›removeWithRetry:fs.rmwithrecursive,force,maxRetries: 6,retryDelay: 200. Node's backoff is linear, so one call waits at most 4.2 s, which keeps both calls of a hook inside vitest's 10 shookTimeout. An error that lasts past the retries still fails the file.local-bin.test.ts'safterAll, itselsewherecleanup, andproc.test.ts'safterAll. No assertion changes.Test plan
npm run typecheckandnpm run buildexit 0.npx vitest run test/local-bin.test.ts test/proc.test.ts --maxWorkers=6on Linux: 38 passed, 2 skipped.--exclude test/ci.test.ts --maxWorkers=6): 3087 passed, 8 skipped.test/ci.test.tswas not run by hand.main, are what show the fix holds.