diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2014-07-22 20:29:52 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2014-07-22 20:29:52 (GMT) |
commit | 9d8118e5c56375feb28416be15fe789ed3c0452a (patch) | |
tree | feaf8266a15674337c12b9e52084530efc9e9bea /Lib | |
parent | 521e5860a5c121700e6ccc5f07053d21b83652df (diff) | |
parent | 889d6463b39ab2d6068b7eed7212eebd16e39574 (diff) | |
download | cpython-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.py | 2 |
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 |