summaryrefslogtreecommitdiff
path: root/Lib/test/test_concurrent_futures.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-05-28 21:02:52 +0900
committerGitHub <noreply@github.com>2019-05-28 21:02:52 +0900
commit9a7e5b1b42abcedb895b1ce49d83fe067d01835c (patch)
treeed8b62255e53b785f13dd4130b2d22540b352aed /Lib/test/test_concurrent_futures.py
parent293e9f86b8d10fcd88d6a2015babae76e9a8bd8f (diff)
downloadcpython-git-9a7e5b1b42abcedb895b1ce49d83fe067d01835c.tar.gz
bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618)
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r--Lib/test/test_concurrent_futures.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index de6ad8f2aa..b27ae71948 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -755,8 +755,8 @@ class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, BaseTestCase):
def test_default_workers(self):
executor = self.executor_type()
- self.assertEqual(executor._max_workers,
- (os.cpu_count() or 1) * 5)
+ expected = min(32, (os.cpu_count() or 1) + 4)
+ self.assertEqual(executor._max_workers, expected)
def test_saturation(self):
executor = self.executor_type(4)