test(lease): bound persistence-lease tests so a hanging mutant fails instead of wedging the run - #56
Merged
Merged
Conversation
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.
Every test in
test/persistence-lease.test.jswaited on real filesystem locking with no time bound. Several mutation-contract mutants remove the guard that lets one of those waits finish, so the test does not fail — it hangs the whole run until CI's job timeout, reporting nothing about which mutant caused it.Found by running
npm run test:mutationon Node 24, which had never been done: CI runs the mutation contract only in the Node 22Quality and package contractsjob. On Node 24 it wedged at mutant 28, and after that at mutant 36 in a different test.testwrapper applying a 30s timeout to all 31 tests. Node 18 has no--test-timeout, so it cannot be a CLI flag. Generous on purpose: normal runs finish in milliseconds.t.after()reaps the child:finallydoes not run when a test times out, and a surviving child keeps its stdio pipes — and the whole runner process — alive after the suite ends.Test-only. No shipped file changes.
Not a product bug. The lease code fails closed correctly and immediately (
ERR_GOAL_PERSISTENCE_LEASE_PATH); only the test harness hung.Checks