]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Wait for "all zones loaded" after rndc reload in "database" test
authorMichal Nowak <mnowak@isc.org>
Thu, 5 Dec 2024 10:58:12 +0000 (11:58 +0100)
committerMichal Nowak <mnowak@isc.org>
Thu, 12 Dec 2024 12:07:37 +0000 (12:07 +0000)
After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

bin/tests/system/database/tests_database.py

index 6793e50b958b9cdced4f62295ea439586a012dc6..476b81da95cbb9d6c3ef5662e68cd361e1e60d4b 100644 (file)
@@ -28,7 +28,9 @@ def test_database(servers, templates):
     )
 
     templates.render("ns1/named.conf", {"rname": "marka.isc.org."})
-    servers["ns1"].rndc("reload")
+    with servers["ns1"].watch_log_from_here() as watcher:
+        servers["ns1"].rndc("reload")
+        watcher.wait_for_line("all zones loaded")
 
     # checking post reload zone
     res = isctest.query.tcp(msg, "10.53.0.1")