Commit fb76c893 authored by Libor Peltan's avatar Libor Peltan

test: fixed zone/older_soa not to depend on timing

parent 9fb269a1
$ORIGIN example.
$TTL 1200
@ SOA ns admin 20110102 7 7 16 600
@ SOA ns admin 20110102 300 300 25 600
ns AAAA ::0
added A 1.2.3.4
$ORIGIN example.
$TTL 1200
@ SOA ns admin 20110101 25 25 80 600
@ SOA ns admin 20110101 300 300 450 600
ns AAAA ::0
......@@ -11,9 +11,6 @@ t = Test()
master = t.server("knot")
slave = t.server("knot")
# this zone has refresh = 7s, retry = 7s and expire = 16s
EXPIRE_SLEEP = 16
RESYNC_SLEEP = 7
zone = t.zone("example.", storage=".")
t.link(zone, master, slave)
......@@ -35,7 +32,9 @@ resp.check(rcode="NOERROR", rdata="1.2.3.4")
master.update_zonefile(zone, version=1)
master.stop()
master.start()
t.sleep(RESYNC_SLEEP - TEST_START_EXPECTED)
t.sleep(2)
slave.ctl("zone-refresh")
t.sleep(3)
resp = master.dig("added.example.", "A")
resp.check(rcode="NXDOMAIN")
......@@ -45,7 +44,9 @@ resp.check(rcode="NOERROR", rdata="1.2.3.4")
# check that slave bootstrapped older zone
t.sleep(EXPIRE_SLEEP - RESYNC_SLEEP)
while not slave.log_search("zone expired"):
t.sleep(2)
t.sleep(3)
resp = slave.dig("added.example.", "A")
resp.check(rcode="NXDOMAIN")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment