]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
So the race is between setting the new serial to return and the message coming in 11592/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 29 Apr 2022 13:44:52 +0000 (13:44 +0000)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 29 Apr 2022 13:44:52 +0000 (13:44 +0000)
Make sure we set the new serial asap

regression-tests.auth-py/test_XFRIncomplete.py

index aef9016f0f9c04a2509164805825251d80c624b1..6061d3123f5162abe93286272e77d7487b96c037 100644 (file)
@@ -24,8 +24,7 @@ class BadXFRServer(object):
         return self._currentSerial
 
     def moveToSerial(self, newSerial):
-        if newSerial == self._currentSerial:
-            print("newSerial == self._currentSerial", file=sys.stderr)
+        if newSerial == self._currentSerial or newSerial == self._targetSerial:
             return False
 
         #if newSerial != self._currentSerial + 1:
@@ -172,6 +171,7 @@ slave-cycle-interval=1
             if currentSerial > serial:
                 raise AssertionError("Expected serial %d, got %d" % (serial, currentSerial))
             if currentSerial == serial:
+                badxfrServer.moveToSerial(serial+1)
                 return
 
             attempts = attempts + 1