mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 17:20:01 -04:00
Retry transient DNS timeouts in retry_with_timeout()
A transient query timeout should retry, not fail the test. Assisted-by: Claude:claude-opus-4-8
This commit is contained in:
parent
3f8e472292
commit
a7d1207324
1 changed files with 4 additions and 1 deletions
|
|
@ -15,6 +15,8 @@ import os
|
|||
import subprocess
|
||||
import time
|
||||
|
||||
import dns.exception
|
||||
|
||||
import isctest.log
|
||||
import isctest.text
|
||||
|
||||
|
|
@ -150,7 +152,8 @@ def retry_with_timeout(func, timeout, delay=1, msg=None):
|
|||
if func():
|
||||
isctest.log.debug(f"retry_with_timeout: {fname} succeeded")
|
||||
return
|
||||
except AssertionError as exc:
|
||||
except (AssertionError, dns.exception.Timeout) as exc:
|
||||
# A transient query timeout means "not ready yet"; keep retrying.
|
||||
exc_msg = str(exc)
|
||||
isctest.log.debug(f"retry_with_timeout: {fname} failed, sleep {delay}s")
|
||||
time.sleep(delay)
|
||||
|
|
|
|||
Loading…
Reference in a new issue