From: Michal Nowak Date: Tue, 2 Jun 2026 14:53:25 +0000 (+0000) Subject: Retry transient DNS timeouts in retry_with_timeout() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7d12073249a09c62df60ef9b99172a6f5a6cf65;p=thirdparty%2Fbind9.git 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 --- diff --git a/bin/tests/system/isctest/run.py b/bin/tests/system/isctest/run.py index 4e11c71ba01..12e403ff622 100644 --- a/bin/tests/system/isctest/run.py +++ b/bin/tests/system/isctest/run.py @@ -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)