Repository navigation
test: stop a stalled Intel clone from failing the next test - #32
Merged
Merged
Conversation
macos-15-intel sometimes leaves a libgit2 clone or worker.terminate() running after Mocha's timeout. Those tests all used test/repos/clone, so the next test deleted that directory and failed on a missing pack lock. Give each attempt its own directory, remove it only after the operation settles, and retry once. Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Confidence Score: 5/5
[Low impact] The PR appears safe to merge; the reported retry race is fixed. Reviews (2) · Last reviewed commit: "test: keep a retry from deleting the pre..." · Reviewed by Greptile |
The two-clone test removed clonePath after the first fetch. A timeout starts the retry's beforeEach, which points that variable at the new directory, so the still-running chain would delete the retry's files. Snapshot the attempt's path and use it for both clones. Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
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
The macOS 15 Intel jobs in run 229 failed twice, on different tests, after a libgit2 operation outlived Mocha's timeout and the next test reused
test/repos/clone.can clone without waiting for callback resultshit the 30s timeout while the clone was still writing the pack.can clone using nested functionthen failed withENOENTcreatingobjects/pack/*.idx.lockbecausebeforeEachhad deleted that directory.can kill worker thread while doing a checkout and exit gracefullytimed out insideworker.terminate(). The next worker test failed withworker reported failureon the same directory.The 3.3.2 commit only bumps the version. The same runner image passed these tests about 20 minutes earlier. Passing tests are unchanged in duration; a stalled attempt now gets a fresh directory and one retry.
Changes
beforeEach.worker.terminate()no longer shares state with the following attempt.exithandlers report throughdone()and ignore the event if the test already finished, so a lateassert.fail()cannot throw into the next test.Test plan
npx jshint test/tests/clone.js test/tests/worker.jsmacos-15-intelfor Node 22, 24, and 26