From: Mark Andrews Date: Tue, 18 Sep 2012 04:49:58 +0000 (+1000) Subject: make tests less timing sensitive by spining X-Git-Tag: v9.10.0a1~882 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=953414e971650328894843f75d721f94cc348027;p=thirdparty%2Fbind9.git make tests less timing sensitive by spining --- diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index 717b9ff2120..46ffe1ef5e2 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -168,7 +168,12 @@ done # slave should have gotten notify and updated -INCR=`grep "test/IN/primary" ns4/named.run|grep "got incremental"|wc -l` +for i in 0 1 2 3 4 5 6 7 8 9 +do + INCR=`grep "test/IN/primary" ns4/named.run|grep "got incremental"|wc -l` + [ $INCR -eq 1 ] && break + sleep 1 +done if [ $INCR -ne 1 ] then echo "I:failed to get incremental response" @@ -193,7 +198,12 @@ do done echo "I: this result should be AXFR" -NONINCR=`grep 'sub\.test/IN/primary' ns4/named.run|grep "got nonincremental" | wc -l` +for i in 0 1 2 3 4 5 6 7 8 9 +do + NONINCR=`grep 'sub\.test/IN/primary' ns4/named.run|grep "got nonincremental" | wc -l` + [ $NONINCR -eq 2 ] && break + sleep 1 +done if [ $NONINCR -ne 2 ] then echo "I:failed to get nonincremental response in 2nd AXFR test" @@ -213,7 +223,12 @@ do sleep 1 done -INCR=`grep "test/IN/primary" ns4/named.run|grep "got incremental"|wc -l` +for i in 0 1 2 3 4 5 6 7 8 9 +do + INCR=`grep "test/IN/primary" ns4/named.run|grep "got incremental"|wc -l` + [ $INCR -eq 2 ] && break + sleep 1 +done if [ $INCR -ne 2 ] then echo "I:failed to get incremental response in 2nd IXFR test" diff --git a/bin/tests/system/staticstub/tests.sh b/bin/tests/system/staticstub/tests.sh index 3a4895e26af..0d055587403 100755 --- a/bin/tests/system/staticstub/tests.sh +++ b/bin/tests/system/staticstub/tests.sh @@ -108,7 +108,12 @@ sed 's/EXAMPLE_ZONE_PLACEHOLDER//' ns3/named.conf.in > ns3/named.conf $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /' # query the child zone again. this should directly go to the child and # succeed. -$DIG +tcp data2.sub.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test2.$n || ret=1 +for i in 0 1 2 3 4 5 6 7 8 9 +do + $DIG +tcp data2.sub.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test2.$n || ret=1 + grep "2nd sub test data" dig.out.ns2.test2.$n > /dev/null && break + sleep 1 +done grep "2nd sub test data" dig.out.ns2.test2.$n > /dev/null || ret=1 # re-enable the parent sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' ns3/named.conf.in > ns3/named.conf