diff options
author | Sam Gross <colesbury@gmail.com> | 2024-03-29 17:34:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 17:34:04 (GMT) |
commit | 397d88db5e9ab2a43de3fdf5f8b973a949edc405 (patch) | |
tree | 5fb573d9c6a84f44d23fd223448dbff4afe7118f | |
parent | f05fb2e65c2dffdfae940f2707765c4994925205 (diff) | |
download | cpython-397d88db5e9ab2a43de3fdf5f8b973a949edc405.zip cpython-397d88db5e9ab2a43de3fdf5f8b973a949edc405.tar.gz cpython-397d88db5e9ab2a43de3fdf5f8b973a949edc405.tar.bz2 |
gh-117344: Skip flaky tests in free-threaded build (#117355)
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.
-rw-r--r-- | Lib/test/test_concurrent_futures/test_process_pool.py | 1 | ||||
-rw-r--r-- | Lib/test/test_concurrent_futures/test_thread_pool.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_concurrent_futures/test_process_pool.py b/Lib/test/test_concurrent_futures/test_process_pool.py index 70444bb..e60e7a6 100644 --- a/Lib/test/test_concurrent_futures/test_process_pool.py +++ b/Lib/test/test_concurrent_futures/test_process_pool.py @@ -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 diff --git a/Lib/test/test_concurrent_futures/test_thread_pool.py b/Lib/test/test_concurrent_futures/test_thread_pool.py index 16043fd..86e6526 100644 --- a/Lib/test/test_concurrent_futures/test_thread_pool.py +++ b/Lib/test/test_concurrent_futures/test_thread_pool.py @@ -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() |