From 8619b74a3d3468b4b38980332606cafeca4f093d Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 18 Mar 2025 11:36:47 +0100 Subject: [PATCH] Tighter (with shorter sleeps) loop for reading, so less time wasted --- regression-tests.recursor-dnssec/test_RPZ.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)) -- 2.47.2