Fix race in proxy-bcrypt test that crashes Windows CI - #1008
Open
X-Guardian wants to merge 1 commit into
Open
X-Guardian wants to merge 1 commit into
X-Guardian wants to merge 1 commit into
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.
ci (latest, windows-latest)failed on master after #1001 (run), with the tape process exiting mid-run duringapp1 build:The error comes from
test/proxy-bcrypt.test.js, which had already passed a few seconds earlier. The same job passed on the preceding PR run and on the next PR run, so this is a timing flake rather than a regression.Cause
The download test resolved on the gunzip stream's
end. At that point tar-fs has writtenbcrypt_lib.nodebut has not finished: it sets the file's times afterwards. The cleanup test then calledrimraf(downloadDir)without awaiting it. On a slow runner the delete won, tar-fs'sutimehit ENOENT, and with no error listener on the extract stream the error was unhandled and killed tape.Changes
Resolve on tar-fs
finishinstead of gunzipend, and reject on errors from either stream, so the test only ends once extraction is complete and any extraction error fails the test rather than the process.Await
rimrafin cleanup, so the directory is gone before the next test file starts.Create
downloadDirin setup. It previously created a stray./downloaddirectory in the working directory, which nothing used.