summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2014-07-22 20:25:03 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2014-07-22 20:25:03 (GMT)
commit889d6463b39ab2d6068b7eed7212eebd16e39574 (patch)
treee20a2fe7c9a15f5e4bc7a4ad070c8e69d2fd90d8 /Lib
parent31e7bfa6ba5354ba44677736a23facb8463077a9 (diff)
downloadcpython-889d6463b39ab2d6068b7eed7212eebd16e39574.zip
cpython-889d6463b39ab2d6068b7eed7212eebd16e39574.tar.gz
cpython-889d6463b39ab2d6068b7eed7212eebd16e39574.tar.bz2
Issue #21901: Cap the maximum number of file descriptors to use for the test.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_selectors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index 34edd76..46026be 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -378,7 +378,7 @@ class ScalableSelectorMixIn:
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
(soft, hard))
- NUM_FDS = hard
+ NUM_FDS = min(hard, 2**16)
except (OSError, ValueError):
NUM_FDS = soft