summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2014-07-22 20:29:52 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2014-07-22 20:29:52 (GMT)
commit9d8118e5c56375feb28416be15fe789ed3c0452a (patch)
treefeaf8266a15674337c12b9e52084530efc9e9bea /Lib
parent521e5860a5c121700e6ccc5f07053d21b83652df (diff)
parent889d6463b39ab2d6068b7eed7212eebd16e39574 (diff)
downloadcpython-9d8118e5c56375feb28416be15fe789ed3c0452a.zip
cpython-9d8118e5c56375feb28416be15fe789ed3c0452a.tar.gz
cpython-9d8118e5c56375feb28416be15fe789ed3c0452a.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 8f83c90..a91fe78 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