adjust system tests to deal with possible timing issues
With the netmgr in use, named may start answering queries before zones are loaded. This can cause transient failures in system tests after servers are restarted or reconfigured. This commit adds retry loops and sleep statements where needed to address this problem. Also incidentally silenced a clang warning.
This commit is contained in:
@@ -259,8 +259,13 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} legacy ns1
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
|
||||
ret=0
|
||||
resolution_fails edns512-notcp. || ret=1
|
||||
# retry loop in case the server restart above causes transient failure
|
||||
for try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
ret=0
|
||||
resolution_fails edns512-notcp. || ret=1
|
||||
[ "$ret" -eq 0 ] && break
|
||||
sleep 1
|
||||
done
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user