Uh oh!
There was an error while loading. Please reload this page.
bpo-30357 each test in test_thread waits until all spawned threads finish - #1583
Conversation
| self.next_ident = 0 | ||
| self.thread_count = thread._count() | ||
| def tearDown(self): |
There was a problem hiding this comment.
This code looks similar to threading_cleanup(): please use threading_setup() and threading_cleanup() from test.support.
vstinner
commented
May 15, 2017
LGTM, but I would prefer to fix experiment this change in the master branch, before touching the super-stable 2.7 branch. Can you propose the same change for the master branch please? |
grzgrzgrz3
commented
May 15, 2017
I was unable to reproduce this issue on the master branch. However still it's worth to clean up tests correctly. I will create new PR for master branch. What you think about rewriting |
vstinner
commented
May 15, 2017
You also need to add yourself to Misc/ACKS. You might also document the change in Misc/NEWS. I created #1592 for master where I credited you ;-) |
vstinner
commented
May 15, 2017
Well, we are talking about race conditions. It's really hard to reproduce them. It's likely that the test order changed between Python 2.7 and master, but it doesn't mean that master is bugfix. Just that the bug is less likely :-)
Sorry, I wanted to fix quickly the bug, so I pushed a fix based on your work on the master branch and added your name ;-) Can you please try to backport the fix to 2.7? Try to cherry-pick the change from master (or complete this change). |
test_thread: setUp() now uses support.threading_setup() and support.threading_cleanup() to wait until threads complete to avoid random side effects on following tests. Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
test_thread: setUp() now uses support.threading_setup() and support.threading_cleanup() to wait until threads complete to avoid random side effects on following tests. Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
vstinner
commented
May 15, 2017
LGTM! Thanks for the backport. |
No description provided.