Commit c6b4476f authored by Libor Peltan's avatar Libor Peltan
Browse files

tests: events/soa: retry query after SERVFAIL to avoid hitting AXFR

parent ffa9cfe1
Pipeline #2259 passed with stages
in 30 minutes and 36 seconds
...@@ -4,15 +4,21 @@ ...@@ -4,15 +4,21 @@
from dnstest.utils import * from dnstest.utils import *
from dnstest.test import Test from dnstest.test import Test
import dns.rcode
import random import random
EXPIRE_SLEEP = 15 EXPIRE_SLEEP = 15
RECHECK_SLEEP = 0.5
def test_ok(slave): def test_ok(slave):
resp = slave.dig("example.", "SOA") resp = slave.dig("example.", "SOA")
resp.check(rcode="NOERROR") resp.check(rcode="NOERROR")
t.sleep(EXPIRE_SLEEP) t.sleep(EXPIRE_SLEEP)
resp = slave.dig("example.", "SOA") resp = slave.dig("example.", "SOA")
if resp.resp.rcode() == dns.rcode.SERVFAIL:
t.sleep(RECHECK_SLEEP)
# retry if we hit the query just in the middle of AXFR
resp = slave.dig("example.", "SOA")
resp.check(rcode="NOERROR") resp.check(rcode="NOERROR")
def test_expired(slave): def test_expired(slave):
......
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