mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
Make sure to reap worker threads and processes at the end of test_concurrent_futures
This commit is contained in:
parent
1f0ccfa853
commit
9470ab43a9
@ -598,16 +598,20 @@ class FutureTests(unittest.TestCase):
|
||||
|
||||
self.assertTrue(isinstance(f1.exception(timeout=5), IOError))
|
||||
|
||||
@test.support.reap_threads
|
||||
def test_main():
|
||||
test.support.run_unittest(ProcessPoolExecutorTest,
|
||||
ThreadPoolExecutorTest,
|
||||
ProcessPoolWaitTests,
|
||||
ThreadPoolWaitTests,
|
||||
ProcessPoolAsCompletedTests,
|
||||
ThreadPoolAsCompletedTests,
|
||||
FutureTests,
|
||||
ProcessPoolShutdownTest,
|
||||
ThreadPoolShutdownTest)
|
||||
try:
|
||||
test.support.run_unittest(ProcessPoolExecutorTest,
|
||||
ThreadPoolExecutorTest,
|
||||
ProcessPoolWaitTests,
|
||||
ThreadPoolWaitTests,
|
||||
ProcessPoolAsCompletedTests,
|
||||
ThreadPoolAsCompletedTests,
|
||||
FutureTests,
|
||||
ProcessPoolShutdownTest,
|
||||
ThreadPoolShutdownTest)
|
||||
finally:
|
||||
test.support.reap_children()
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
Loading…
Reference in New Issue
Block a user