test: use unique file names in fs trace test#43504
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Jun 22, 2022
Merged
test: use unique file names in fs trace test#43504nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs#43502
benjamingr
approved these changes
Jun 20, 2022
richardlau
approved these changes
Jun 20, 2022
Contributor
|
@bnoordhuis Great work! Thank you for the fix. |
Collaborator
LiviaMedeiros
approved these changes
Jun 20, 2022
Member
LiviaMedeiros
left a comment
There was a problem hiding this comment.
While we're at it, can const tests = new Array(); be replaced with const tests = {}; (sic!)?
Contributor
Make sense to me. It is wired use Array as a object/Map. |
aduh95
approved these changes
Jun 20, 2022
Contributor
aduh95
left a comment
There was a problem hiding this comment.
Would it make sense to use an incrementing variable in case we want to add/delete some test cases in the future?
F3n67u
approved these changes
Jun 20, 2022
lpinca
approved these changes
Jun 20, 2022
Trott
approved these changes
Jun 20, 2022
Contributor
|
Fast-track has been requested by @Trott. Please 👍 to approve. |
Collaborator
|
Landed in a7c9130 |
F3n67u
pushed a commit
to F3n67u/node
that referenced
this pull request
Jun 24, 2022
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs#43502 PR-URL: nodejs#43504 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jul 12, 2022
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jul 20, 2022
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: #43502 PR-URL: #43504 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
Should fix test flakiness that is presumably caused by the asynchronous nature of the unlink operation on Windows. It's been observed that sub-tests randomly fail with "permission denied" errors when trying to create a new file in a directory with appropriate permissions. The DeleteFile() NT API call makes a file inaccessible and marks it for deletion but doesn't actually delete it until the last open handle has been closed. Accessing such a file fails with ERROR_ACCESS_DENIED. Processes can close handles manually or wait for the operating system to close them asynchronously after process termination. I speculate it's the latter that's causing the test to turn flaky. Fixes: nodejs/node#43502 PR-URL: nodejs/node#43504 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
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.
Should fix test flakiness that is presumably caused by the asynchronous
nature of the unlink operation on Windows.
It's been observed that sub-tests randomly fail with "permission denied"
errors when trying to create a new file in a directory with appropriate
permissions.
The DeleteFile() NT API call makes a file inaccessible and marks it for
deletion but doesn't actually delete it until the last open handle has
been closed. Accessing such a file fails with ERROR_ACCESS_DENIED.
Processes can close handles manually or wait for the operating system to
close them asynchronously after process termination. I speculate it's
the latter that's causing the test to turn flaky.
Fixes: #43502