bpo-30357 each test in test_thread waits until all spawned threads fi… · python/cpython@6924ed5 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 6924ed5
and
committed
bpo-30357 each test in test_thread waits until all spawned threads finish (#1583)
* bpo-30357 each test in test_thread waits until all spawn threads finish * bpo-30357 each test in test_thread waits until all spawn threads finish * bpo-30357: test_thread now uses threading_cleanup() (#1592) 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 * bpo-30357: test_thread now uses threading_cleanup() (#1592) 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
File tree
3 files changed
lines changed
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -22,6 +22,7 @@ def verbose_print(arg): | ||
22 | 22 | print arg |
23 | 23 | |
24 | 24 | |
25 | + | |
25 | 26 | class BasicThreadTest(unittest.TestCase): |
26 | 27 | |
27 | 28 | def setUp(self): |
@@ -33,6 +34,9 @@ def setUp(self): | ||
33 | 34 | self.running = 0 |
34 | 35 | self.next_ident = 0 |
35 | 36 | |
37 | +key = test_support.threading_setup() | |
38 | +self.addCleanup(test_support.threading_cleanup, *key) | |
39 | + | |
36 | 40 | |
37 | 41 | class ThreadRunningTests(BasicThreadTest): |
38 | 42 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -507,6 +507,7 @@ Fabian Groffen | ||
507 | 507 | Eric Groo |
508 | 508 | Dag Gruneau |
509 | 509 | Filip Gruszczyński |
510 | +Grzegorz Grzywacz | |
510 | 511 | Thomas Guettler |
511 | 512 | Anuj Gupta |
512 | 513 | Michael Guravage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -12109,6 +12109,10 @@ IDLE | ||
12109 | 12109 | |
12110 | 12110 | Tests |
12111 | 12111 | ----- |
12112 | +- bpo-30357: test_thread: setUp() now uses support.threading_setup() and | |
12113 | + support.threading_cleanup() to wait until threads complete to avoid | |
12114 | + random side effects on following tests. Initial patch written by Grzegorz | |
12115 | + Grzywacz. | |
12112 | 12116 | |
12113 | 12117 | - Refactor test_logging to use unittest. |
12114 | 12118 |