mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
[Tests] Increase file descriptor limit
Increase the file descriptor limit to avoid 'Too many files open' error when running tests.
This commit is contained in:
parent
e379e035c7
commit
e827420569
1 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
||||||
|
# Increase open file descriptor limit to allow tests to run
|
||||||
|
# without getting error: what(): epoll: Too many open files
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
try:
|
||||||
|
import resource
|
||||||
|
except ImportError: # Does not exist on Windows
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
resource.setrlimit(resource.RLIMIT_NOFILE, (65536, 65536))
|
||||||
|
except (ValueError, resource.error) as ex:
|
||||||
|
print("Failed to raise file descriptor limit:", ex)
|
Loading…
Add table
Add a link
Reference in a new issue