Skip to content

Conversation

@Trott
Copy link
Member

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools test

Description of change

The repeat option in test.py did not work as expected if -j was set to
more than one. Repeated tests running at the same time could share temp
directories and cause test failures. This was observed with:

tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive 

By using copy.deepCopy(), the repeated tests are separate objects and
not references to the same objects. Setting thread_id on one of them
will now not change the thread_id on all of them. And thread_id is
how the temp directory (and common.PORT as well) are determined.

@santigimeno@mhdawson

@TrottTrott added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Oct 24, 2016
@nodejs-github-botnodejs-github-bot added the tools Issues and PRs related to the tools directory. label Oct 24, 2016
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: nodejs#9228
@Trott
Copy link
MemberAuthor

@gibfahn
Copy link
Member

I've definitely seen fs tests failing due to this error, thanks @Trott !

Copy link
Member

@santigimenosantigimeno left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

jasnell pushed a commit that referenced this pull request Oct 26, 2016
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: #9228 PR-URL: #9249 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
@jasnell
Copy link
Member

Landed in 60a78ae

@jasnelljasnell closed this Oct 26, 2016
evanlucas pushed a commit that referenced this pull request Nov 3, 2016
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: #9228 PR-URL: #9249 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
@evanlucasevanlucas mentioned this pull request Nov 3, 2016
MylesBorins pushed a commit that referenced this pull request Nov 22, 2016
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: #9228 PR-URL: #9249 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 22, 2016
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: #9228 PR-URL: #9249 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
This was referenced Nov 22, 2016
@TrottTrott deleted the repeat branch January 13, 2022 22:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@Trott@gibfahn@jasnell@thefourtheye@santigimeno@mhdawson@MylesBorins@nodejs-github-bot