Skip to content

Commit

Permalink
Issue python#21901: Cap the maximum number of file descriptors to use…
Browse files Browse the repository at this point in the history
… for the test.
  • Loading branch information
cf-natali committed Jul 22, 2014
2 parents 521e586 + 889d646 commit 9d8118e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def test_above_fd_setsize(self):
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

Expand Down

0 comments on commit 9d8118e

Please sign in to comment.