]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Retry the key-state check in test_ksr_fast
authorMichal Nowak <mnowak@isc.org>
Tue, 2 Jun 2026 14:53:25 +0000 (14:53 +0000)
committerMichal Nowak <mnowak@isc.org>
Wed, 10 Jun 2026 19:15:09 +0000 (19:15 +0000)
named updates the state file asynchronously; one read can race it.

Assisted-by: Claude:claude-opus-4-8
bin/tests/system/ksr/tests_ksr.py

index 406250b6f1f34305e373b4921362295132ff8081..32060acd3c08a3fd42b41b50657913493ca05d96 100644 (file)
@@ -1457,8 +1457,15 @@ def test_ksr_fast(ns1):
     isctest.kasp.check_dnssecstatus(ns1, zone, zsks, policy=policy, verbose=True)
     # - dnssec_verify
     isctest.kasp.check_dnssec_verify(ns1, zone)
+
     # - check keys
-    check_keys(zsks, lifetime, FASTCONFIG, with_state=True)
+    # named updates the state file asynchronously, so retry the state check
+    # until the rumoured -> omnipresent transition catches up.
+    def check_keys_state():
+        check_keys(zsks, lifetime, FASTCONFIG, with_state=True)
+        return True
+
+    isctest.run.retry_with_timeout(check_keys_state, timeout=30)
     # - check apex
     isctest.kasp.check_apex(ns1, zone, ksks, zsks, offline_ksk=True)
     # - check subdomain