Kaydet (Commit) 9d8118e5 authored tarafından Charles-François Natali's avatar Charles-François Natali

Issue #21901: Cap the maximum number of file descriptors to use for the test.

...@@ -378,7 +378,7 @@ class ScalableSelectorMixIn: ...@@ -378,7 +378,7 @@ class ScalableSelectorMixIn:
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard)) resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE, self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
(soft, hard)) (soft, hard))
NUM_FDS = hard NUM_FDS = min(hard, 2**16)
except (OSError, ValueError): except (OSError, ValueError):
NUM_FDS = soft NUM_FDS = soft
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment