From: David VaĊĦek Date: Tue, 12 Aug 2025 15:37:00 +0000 (+0200) Subject: tests-extra: ixfr/master_pin2 -- align the servers at the start X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efef4c7663bb24227fc746795b8498fe2e1ddfe3;p=thirdparty%2Fknot-dns.git tests-extra: ixfr/master_pin2 -- align the servers at the start Notice: Both masters send their NOTIFY's to the slave. The slave makes refresh from the last master which it received NOTIFY from - it's the current state of Knot DNS design. If a NOTIFY for lower serial arrives close enough after the previous NOTIFY for a higher serial from another master, before the slave made refresh from the first master, the first NOTIFY "knowledge" gets "overwritten" by the second one with lower serial, resulting in refresh from the lagging behind master and a rare test failure. --- diff --git a/tests-extra/tests/ixfr/master_pin2/test.py b/tests-extra/tests/ixfr/master_pin2/test.py index a7deac6c7c..cfc242180e 100644 --- a/tests-extra/tests/ixfr/master_pin2/test.py +++ b/tests-extra/tests/ixfr/master_pin2/test.py @@ -52,11 +52,26 @@ for m in [ masterA, masterB ]: m.dnssec(zones).enable = True m.conf_zone(zones).journal_content = "all" +masterA.conf_zone(zones).notify_delay = "0" # Disable even the small random value tests use. +masterB.conf_zone(zones).notify_delay = "0" # masterB.conf_zone(zones).serial_modulo = str(-PIN) t.start() +ma_serials0 = masterA.zones_wait(zones) +mb_serials0 = masterB.zones_wait(zones) +slave.zones_wait(zones) + +# Align the masters before the testing starts. +slave.ctl("zone-freeze", wait=True) serials0 = slave.zones_wait(zones) +masterA.ctl("zone-sign") +masterB.ctl("zone-sign") +masterA.zones_wait(zones, ma_serials0) +masterB.zones_wait(zones, mb_serials0) +slave.ctl("zone-thaw") + +serials0 = slave.zones_wait(zones, serials0) for m in [ masterA, masterB ]: up = m.update(zone) @@ -79,6 +94,7 @@ masterA.ctl("zone-thaw") t.sleep(4) +# May fail occasionally, for details see this commit's message. check_cur(masterA, masterB) RUNNING = False