From cdada40b23b1f7f527797ba7cb14c25820b05981 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 8 Jul 2019 02:51:49 -0700 Subject: [PATCH] bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14645) test_concurrent_futures now explicitly stops the ForkServer instance if it's running. (cherry picked from commit e676244235895aeb6ec3b81ca3ccf4a70e487919) Co-authored-by: Victor Stinner --- Lib/test/test_concurrent_futures.py | 3 +++ .../NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py index fa298207f6c509..98c9bc9b507a47 100644 --- a/Lib/test/test_concurrent_futures.py +++ b/Lib/test/test_concurrent_futures.py @@ -1310,6 +1310,9 @@ def tearDownModule(): # 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() diff --git a/Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst b/Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst new file mode 100644 index 00000000000000..0766d70f6eda3b --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst @@ -0,0 +1,2 @@ +test_concurrent_futures now explicitly stops the ForkServer instance if it's +running.