Skip to content

Conversation

@piscisaureus
Copy link
Contributor

Now that parallel tests are enabled, the test runner spits out a ton of
'access denied' errors while running the tests. These happen because a
virus scanner or the indexing service temporarily open the file after it
has been updated, and the test runner tries to unlink() them at the same
time.

This patch resolves this issue by attempting to unlink the file until it
succeeds.

R=@bnoordhuis

@piscisaureus piscisaureus changed the title Test fix unlink win,test: try again if file unlink fails Jan 10, 2015
tools/test.py Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sys.platform == 'win32' is slightly more idiomatic. Maybe the comment could mention that 'another process' means a virus scanner or an indexer because the only two calls to CheckedUnlink() are for temp files. An unwitting reader could easily assume that the loop is not in fact necessary.

Now that parallel tests are enabled, the test runner spits out a ton of
'access denied' errors while running the tests. These happen because a
virus scanner or the indexing service temporarily open the file after it
has been updated, and the test runner tries to unlink() them at the same
time.

This patch resolves this issue by attempting to unlink the file until it
succeeds.

PR-URL: nodejs#284
Reviewed-by: Ben Noordhuis <[email protected]>
@piscisaureus piscisaureus merged commit b57e9a9 into nodejs:v1.x Jan 11, 2015
@piscisaureus piscisaureus deleted the test-fix-unlink branch January 11, 2015 00:55
@bnoordhuis
Copy link
Member

LGTM even if makes me feel a little squeamish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants