Skip to content

test: retry temp folder removal for tests that spawn Electron#4316

Merged
erickzhao merged 1 commit into
nextfrom
test/fix-temp-dir-ebusy
Jul 10, 2026
Merged

test: retry temp folder removal for tests that spawn Electron#4316
erickzhao merged 1 commit into
nextfrom
test/fix-temp-dir-ebusy

Conversation

@erikian

@erikian erikian commented Jul 10, 2026

Copy link
Copy Markdown
Member
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

When cleaning up temporary folders containing an Electron executable that is spawned by a test, fs.promises.rm can sometimes throw Error: EBUSY: resource busy or locked, unlink 'path\to\electron-app.exe' on Windows (see https://github.com/electron/forge/actions/runs/28900198935/job/85735026394#step:11:1731 and https://github.com/electron/forge/actions/runs/29090950003/job/86356018118#step:11:1763), failing the test.

This PR sets the maxRetries option for fs.promises.rm so we can handle this scenario more gracefully in the two tests where it can happen.

When cleaning up temporary folders containing an Electron executable that is spawned by a test, `fs.promises.rm` can sometimes throw `Error: EBUSY: resource busy or locked, unlink 'path\to\electron-app.exe'` on Windows (see https://github.com/electron/forge/actions/runs/28900198935/job/85735026394#step:11:1731 and https://github.com/electron/forge/actions/runs/29090950003/job/86356018118#step:11:1763), failing the test.

This PR sets the `maxRetries` option for `fs.promises.rm` so we can handle this scenario more gracefully in the two tests where it can happen.
@erikian erikian requested a review from a team as a code owner July 10, 2026 13:00
@github-actions github-actions Bot added the next label Jul 10, 2026
@erickzhao erickzhao merged commit 3b20d8d into next Jul 10, 2026
15 checks passed
@erickzhao erickzhao deleted the test/fix-temp-dir-ebusy branch July 10, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants