From: Otto Moerbeek Date: Tue, 18 Mar 2025 10:36:47 +0000 (+0100) Subject: Tighter (with shorter sleeps) loop for reading, so less time wasted X-Git-Tag: dnsdist-2.0.0-alpha2~129^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8619b74a3d3468b4b38980332606cafeca4f093d;p=thirdparty%2Fpdns.git Tighter (with shorter sleeps) loop for reading, so less time wasted --- diff --git a/regression-tests.recursor-dnssec/test_RPZ.py b/regression-tests.recursor-dnssec/test_RPZ.py index 25f3b00d8c..2384d7ad2b 100644 --- a/regression-tests.recursor-dnssec/test_RPZ.py +++ b/regression-tests.recursor-dnssec/test_RPZ.py @@ -190,7 +190,7 @@ class RPZServer(object): for b in lenprefix: conn.send(bytes([b])) - time.sleep(0.5) + time.sleep(0.1) conn.send(wire) self._currentSerial = serial @@ -446,6 +446,7 @@ e 3600 IN A 192.0.2.42 rpzServer.moveToSerial(serial) attempts = 0 + incr = .1 while attempts < timeout: currentSerial = rpzServer.getCurrentSerial() if currentSerial > serial: @@ -455,8 +456,8 @@ e 3600 IN A 192.0.2.42 self.checkDump(serial) return - attempts = attempts + 1 - time.sleep(1) + attempts = attempts + incr + time.sleep(incr) raise AssertionError("Waited %d seconds for the serial to be updated to %d but the serial is still %d" % (timeout, serial, currentSerial))