]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117344: Skip flaky tests in free-threaded build (#117355)
authorSam Gross <colesbury@gmail.com>
Fri, 29 Mar 2024 17:34:04 +0000 (13:34 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Mar 2024 17:34:04 +0000 (13:34 -0400)
The tests are not reliable with the GIL disabled. In theory, they can
fail with the GIL enabled too, but the failures are much more likely
with the GIL disabled.

Lib/test/test_concurrent_futures/test_process_pool.py
Lib/test/test_concurrent_futures/test_thread_pool.py

index 70444bb147fadca2d50f1256387fef63ae2cbe60..e60e7a6607a997826e769d55689b6ef1f53302f8 100644 (file)
@@ -116,6 +116,7 @@ class ProcessPoolExecutorTest(ExecutorTest):
         for _ in range(job_count):
             sem.release()
 
+    @unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
     def test_idle_process_reuse_one(self):
         executor = self.executor
         assert executor._max_workers >= 4
index 16043fd1235614048cfbac80bff7bb863b0ae044..86e65265516c3fda51e9e02ac33ee17db811c7ff 100644 (file)
@@ -41,6 +41,7 @@ class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, BaseTestCase):
             sem.release()
         executor.shutdown(wait=True)
 
+    @unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
     def test_idle_thread_reuse(self):
         executor = self.executor_type()
         executor.submit(mul, 21, 2).result()