fix(test): the H4 fixture teardown waits for exit + retries the rmSync (#830) - #831
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… create 60s, factory 30s, ceiling 300s
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.
Closes #830.
The session-API availability fixture's teardown was fire-and-forget: SIGTERM + an unref'd SIGKILL timer, then an IMMEDIATE recursive rmdir of the temp HOME — while the vendored binary's background package-install was still writing into it.
ENOTEMPTYon CI, reproduced twice on the same run (zod/src/v3/tests, then effect/dist/unstable — the nondeterminism of a write-race), never on a warm director-local run. It blocked every open PR'sfastcheck (seen blocking #828).Fix, both halves of the race: (a)
killAndWait()— SEQUENTIAL shutdown awaited to process exit (SIGTERM → 10s bounded wait → SIGKILL → 5s bounded wait; the exit/error listeners are cleaned on timeout); (b) a RETRYINGrmSync(maxRetries 20 × retryDelay 250ms — Node natively retries ENOTEMPTY/EBUSY) bounding any residual grandchild writer.Honesty note on the RED: a cross-process write-race has no deterministic RED — the reviewer's own note on the #814 review said exactly this of the lock-release race. The verification is the fixture passing locally (director-run) and the CI
fastjob green across reruns; the race window that CI hit twice is now closed at the root (no write can be in flight after a child-exit await) and bounded at the surface (retried removal).Verification: mode_block suite (32 tests) green locally, full extension suite green, smoke PASS — director-run, scrubbed env.