Merge branch '2944-doth-system-test-fails-with-256-file-descriptors' into 'main'

Resolve "doth system test fails with 256 file descriptors"

Closes #2944

See merge request isc-projects/bind9!5477
This commit is contained in:
Mark Andrews
2021-10-20 20:45:17 +00:00

View File

@@ -18,12 +18,20 @@ import random
import time
from functools import reduce
from resource import getrlimit
from resource import setrlimit
from resource import RLIMIT_NOFILE
MULTIDIG_INSTANCES = 10
CONNECT_TRIES = 5
random.seed()
# Ensure we have enough file desriptors to work
rlimit_nofile = getrlimit(RLIMIT_NOFILE)
if rlimit_nofile[0] < 1024:
setrlimit(RLIMIT_NOFILE, (1024, rlimit_nofile[1]))
# Introduce some random delay
def jitter():