diff options
author | Victor Stinner <vstinner@python.org> | 2019-12-17 18:37:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 18:37:26 +0100 |
commit | 9707e8e22d80ca97bf7a9812816701cecde6d226 (patch) | |
tree | 088de81a48039faca3709360325055105b9d9c56 /Lib/test/test_concurrent_futures.py | |
parent | 630c8df5cf126594f8c1c4579c1888ca80a29d59 (diff) | |
download | cpython-9707e8e22d80ca97bf7a9812816701cecde6d226.tar.gz cpython-9707e8e22d80ca97bf7a9812816701cecde6d226.zip |
bpo-38546: multiprocessing tests stop the resource tracker (GH-17641)
Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.
Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.
Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r-- | Lib/test/test_concurrent_futures.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index 8b751853019..7b10f81ff20 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -1306,17 +1306,7 @@ def setUpModule(): def tearDownModule(): support.threading_cleanup(*_threads_key) - support.reap_children() - - # cleanup multiprocessing - multiprocessing.process._cleanup() - # Stop the ForkServer process if it's running - from multiprocessing import forkserver - forkserver._forkserver._stop() - # bpo-37421: Explicitly call _run_finalizers() to remove immediately - # temporary directories created by multiprocessing.util.get_temp_dir(). - multiprocessing.util._run_finalizers() - support.gc_collect() + multiprocessing.util._cleanup_tests() if __name__ == "__main__": |