]> granicus.if.org Git - python/commitdiff
Issue #21901: Cap the maximum number of file descriptors to use for the test.
authorCharles-François Natali <cf.natali@gmail.com>
Tue, 22 Jul 2014 20:25:03 +0000 (21:25 +0100)
committerCharles-François Natali <cf.natali@gmail.com>
Tue, 22 Jul 2014 20:25:03 +0000 (21:25 +0100)
Lib/test/test_selectors.py

index 34edd7630ddd89ac68eee60f7ea50f45894597e0..46026be0aa60bb972cbfa0c3c246f1be5cbbd9d0 100644 (file)
@@ -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