]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 24 Jan 2024 07:13:09 +0000 (09:13 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Jan 2024 07:13:09 +0000 (09:13 +0200)
Lib/test/_test_multiprocessing.py

index 6a050fa541db1ed4bcef0be4d4e71718e65ed01e..c0d3ca50f17d69d3da4d914f1af44bbaeeb31479 100644 (file)
@@ -2705,6 +2705,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()