@classmethod
def waitForTCPSocket(cls, ipaddress, port):
- for try_number in range(0, 100):
+ for try_number in range(0, 1000):
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1.0)
except Exception as err:
if err.errno != errno.ECONNREFUSED:
print(f'Error occurred: {try_number} {err}', file=sys.stderr)
- time.sleep(0.1)
+ time.sleep(0.01)
@classmethod
def startAuth(cls, confdir, ipaddress):
return
try:
p.terminate()
- for count in range(100): # tsan can be slow
+ for count in range(1000): # tsan can be slow
x = p.poll()
if x is not None:
break
- time.sleep(0.1)
+ time.sleep(0.01)
if x is None:
print("kill...", p, file=sys.stderr)
p.kill()
raise AssertionError('%s failed (%d): %s' % (rec_controlCmd, e.returncode, e.output))
# Wait for it, as the process really should have exited
p = cls._recursor
- for count in range(100): # tsan can be slow
+ for count in range(1000): # tsan can be slow
if p.poll() is not None:
break
- time.sleep(0.1)
+ time.sleep(0.01)
if p.poll() is None:
raise AssertionError('Process did not exit on request within 10s')
if p.returncode not in (0, -15):
def tearDownResponders(cls):
cls._backgroundThreads[cls._TLSResponder.native_id] = False
count = 0
- while count < 20 and len(cls._backgroundThreads) != 0:
+ while count < 200 and len(cls._backgroundThreads) != 0:
print(f'Waiting for background responder thread to exit {count}...')
- time.sleep(0.1)
+ time.sleep(0.01)
count = count + 1
def checkOnlyTLSResponderHit(self, numberOfTLSQueries=1):
grepCmd = ['grep', 'END OF FAIL TRACE', 'configs/' + self._confdir + '/recursor.log']
ret = b''
- for i in range(10):
- time.sleep(1)
+ for i in range(1000):
+ time.sleep(0.01)
try:
ret = subprocess.check_output(grepCmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
def testZTC(self):
grepCmd = ['grep', 'validationStatus="Secure"', 'configs/' + self._confdir + '/recursor.log']
ret = b''
- for i in range(300):
- time.sleep(0.1)
+ for i in range(3000):
+ time.sleep(0.01)
try:
ret = subprocess.check_output(grepCmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e: