]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:drs:test:getncchanges: add a timeout failure
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 8 Aug 2024 23:20:38 +0000 (11:20 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 28 Aug 2024 04:24:39 +0000 (04:24 +0000)
In the next commit we are going to add tests in which the client
modifies the highwatermark in a way that resets replication (on Samba
only). After that we'll fix it.

If we leave the test in an eternal loop, the commit history will not
be bisectable, so we are temporarily going to turn long waits into
failures.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15701

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz>
source4/torture/drs/python/getncchanges.py

index 6b5456a66a8acd6defbdc30f3671c4172f83aba1..f7b1fe8eeff616ee57e6742266f0a7d5bf018929 100644 (file)
@@ -33,6 +33,7 @@ import samba.tests
 import ldb
 from ldb import SCOPE_BASE
 import random
+import time
 
 from samba.dcerpc import drsuapi, misc
 from samba import WERRORError
@@ -57,6 +58,7 @@ class DrsReplicaSyncIntegrityTestCase(drs_base.DrsBaseTestCase):
 
         self.default_conn = DcConnection(self, self.ldb_dc2, self.dnsname_dc2)
         self.set_dc_connection(self.default_conn)
+        self.start_time = time.time()
 
     def init_test_state(self):
         self.rxd_dn_list = []
@@ -358,6 +360,9 @@ class DrsReplicaSyncIntegrityTestCase(drs_base.DrsBaseTestCase):
 
     def replication_complete(self):
         """Returns True if the current/last replication cycle is complete"""
+        now = time.time()
+        if now - self.start_time > 30:
+            self.fail("we seem to be in an eternal loop")
 
         if self.last_ctr is None or self.last_ctr.more_data:
             return False