The test_idle_timeout check in the "timeouts" system test has been
failing often on FreeBSD 13 AWS hosts. Adding timestamped debug logging
shows that the time.sleep() calls used in that check are returning
significantly later than asked to on that platform (e.g. after 4 seconds
when just 1 second is requested), breaking the test's timing assumptions
and triggering false positives. These failures are not an indication of
a bug in named and have not been observed on any other platform. Mark
the problematic check as flaky, but only on FreeBSD 13, so that other
failure modes are caught appropriately.
(cherry picked from commit
cb76b3729e082f6c1ac0fbf608cee9bcb879cefa)
# pylint: disable=unused-variable
+import platform
import socket
import time
raise EOFError from e
+def is_host_freebsd_13(*_):
+ return platform.system() == "FreeBSD" and platform.release().startswith("13")
+
+
+@isctest.mark.flaky(max_runs=2, rerun_filter=is_host_freebsd_13)
def test_idle_timeout(named_port):
#
# The idle timeout is 5 seconds, so the third message should fail