From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 24 Jan 2024 07:26:58 +0000 (+0100) Subject: [3.11] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start... X-Git-Tag: v3.11.8~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b39a314edaf15716e9d9a2ff1d11ac79e09d97fa;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249) (GH-114517) (cherry picked from commit ce75b4c26d18dcd840fd2e7ee362a84209648d06) Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 95ef18958e63..a5c62b9ea645 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -2704,6 +2704,7 @@ class _TestPool(BaseTestCase): p = self.Pool(3) args = [sleep_time for i in range(10_000)] result = p.map_async(time.sleep, args, chunksize=1) + time.sleep(0.2) # give some tasks a chance to start p.terminate() p.join()