]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
make tests less timing sensitive by spining
authorMark Andrews <marka@isc.org>
Tue, 18 Sep 2012 04:49:58 +0000 (14:49 +1000)
committerMark Andrews <marka@isc.org>
Tue, 18 Sep 2012 04:49:58 +0000 (14:49 +1000)
bin/tests/system/ixfr/tests.sh
bin/tests/system/staticstub/tests.sh

index 717b9ff2120ec517985d115db4e001e6d640e4e3..46ffe1ef5e27d0e8e6b9cb4a3c1e779bc73990a1 100644 (file)
@@ -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"
index 3a4895e26afc3ca055487b57617ebfa325045005..0d0555874036c0a448f9f5272b3427c732edaf04 100755 (executable)
@@ -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