]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Bump wait time in servestale test with 1 second
authorMatthijs Mekking <matthijs@isc.org>
Thu, 10 Jun 2021 07:55:17 +0000 (09:55 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 23 Jun 2021 13:09:59 +0000 (13:09 +0000)
This check intermittently failed:

I:serve-stale:check not in cache longttl.example times out...
I:serve-stale:failed

This corresponds to this query in the test:

$DIG -p ${PORT} +tries=1 +timeout=3  @10.53.0.3 longttl.example TXT

Looking at the dig output for a failed test, the query actually got a
response from the authoritative server (in one specific example the
query time was 2991 msec, close to 3 seconds).

After doing the query for the test, we enable the authoritative
server after a sleep of three seconds. If we bump this sleep to 4
seconds, the race will be more in favor of the query timing out,
making it unlikely that this test will fail intermittently.

Bump the subsequent wait_for_log checks also with one second.

bin/tests/system/serve-stale/tests.sh

index b3b0071090fc8ce26074d92bfc29c2754e6bfc7f..c49f6647bf457badec017b06521e254ff3bf66a5 100755 (executable)
@@ -1694,7 +1694,7 @@ $DIG -p ${PORT} +tries=1 +timeout=10  @10.53.0.3 longttl.example TXT > dig.out.t
 n=$((n+1))
 echo_i "enable responses from authoritative server ($n)"
 ret=0
-sleep 3
+sleep 4
 $DIG -p ${PORT} @10.53.0.2 txt enable  > dig.out.test$n
 grep "ANSWER: 1," dig.out.test$n > /dev/null || ret=1
 grep "TXT.\"1\"" dig.out.test$n > /dev/null || ret=1
@@ -1704,13 +1704,13 @@ status=$((status+ret))
 n=$((n+1))
 echo_i "check not in cache longttl.example times out (stale-answer-client-timeout 1.8) ($n)"
 ret=0
-wait_for_log 3 "longttl.example client timeout, stale answer unavailable" ns3/named.run || ret=1
+wait_for_log 4 "longttl.example client timeout, stale answer unavailable" ns3/named.run || ret=1
 check_results() {
     [ -s "$1" ] || return 1
     grep "connection timed out" "$1" > /dev/null || return 1
     return 0
 }
-retry_quiet 3 check_results dig.out.test$n || ret=1
+retry_quiet 4 check_results dig.out.test$n || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status+ret))
 
@@ -1723,7 +1723,7 @@ check_results() {
     grep "ANSWER: 1," "$1" > /dev/null || return 1
     return 0
 }
-retry_quiet 7 check_results dig.out.test$n || ret=1
+retry_quiet 8 check_results dig.out.test$n || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status+ret))