2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 06:55:30 +00:00

statschannel test: try 5 times to check if compressed and regular output of statschannel is the same - some counters can change, minimize risk of bad timing

This commit is contained in:
Witold Kręcicki
2018-10-25 19:37:32 +00:00
parent 7ef2467e6a
commit 5979471dc7

View File

@@ -197,8 +197,9 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
ret=0
echo_i "checking consistency between regular and compressed output ($n)"
for i in 1 2 3 4 5; do
ret=0
if [ "$HAVEXMLSTATS" ];
then
URL=http://10.53.0.2:${EXTRAPORT1}/xml/v3/server
@@ -210,7 +211,14 @@ $CURL -D regular.headers $URL 2>/dev/null | \
$CURL -D compressed.headers --compressed $URL 2>/dev/null | \
sed -e "s#<current-time>.*</current-time>##g" > compressed.out
diff regular.out compressed.out >/dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
if [ $ret != 0 ]; then
echo_i "failed on try $i, probably a timing issue, trying again"
sleep 1
else
break
fi
done
status=`expr $status + $ret`
n=`expr $n + 1`