Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 889d646

Browse files
committed
Issue #21901: Cap the maximum number of file descriptors to use for the test.
1 parent 31e7bfa commit 889d646

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_selectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def test_above_fd_setsize(self):
378378
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
379379
self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
380380
(soft, hard))
381-
NUM_FDS = hard
381+
NUM_FDS = min(hard, 2**16)
382382
except (OSError, ValueError):
383383
NUM_FDS = soft
384384

0 commit comments

Comments
 (0)