]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix flaky reclimit test by adding missing sleep 12028/head
authorOndřej Surý <ondrej@isc.org>
Wed, 1 Apr 2026 17:19:50 +0000 (19:19 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 15 May 2026 07:51:10 +0000 (09:51 +0200)
The cache verification in steps 11 and 15 checks that the TTL has
decreased from its initial value to confirm the response was served
from cache, but the sleep between the two queries was missing. Both
queries could complete within the same second, leaving the TTL
unchanged and causing the test to incorrectly conclude the entry was
not cached.

(cherry picked from commit 80f04a9ee5cd90e875243a5ea991e28119bd546b)

bin/tests/system/reclimit/tests.sh

index 76889eca4cd7eee655473b0063d78806eaa816e5..c15225488f912c14aef683d35ccb35995dbae7b9 100644 (file)
@@ -282,7 +282,8 @@ echo_i "checking that priority names under the max-types-per-name limit get cach
 for rrtype in AAAA MX NS; do
   check_manytypes 1 manytypes.big "${rrtype}" NOERROR big SOA 120 || ret=1
 done
-# Wait at least 1 second
+# Wait at least 1 second for the TTL to decrement
+sleep 1
 for rrtype in AAAA MX NS; do
   check_manytypes 2 manytypes.big "${rrtype}" NOERROR big SOA "" 120 || ret=1
 done
@@ -358,7 +359,8 @@ echo_i "checking that priority NXDOMAIN names over the max-types-per-name limit
 for rrtype in AAAA MX NS; do
   check_manytypes 1 manytypes.big "${rrtype}" NOERROR big SOA 120 || ret=1
 done
-# Wait at least 1 second
+# Wait at least 1 second for the TTL to decrement
+sleep 1
 for rrtype in AAAA MX NS; do
   check_manytypes 2 manytypes.big "${rrtype}" NOERROR big SOA "" 120 || ret=1
 done