From df7f4308940489ec708ab582dccc1350ecac77a0 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Tue, 2 Feb 2016 09:46:43 +0530 Subject: [PATCH] Remove 45 second sleeps from notify system test (#41248) No CHANGES entry required. (cherry picked from commit f9b167290a56481a75528491ced77e9ce8c6181d) --- bin/tests/system/notify/tests.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh index 6dd79eb37f..28fbfd6256 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -55,12 +55,18 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1 [ $ret = 0 ] || echo "I:failed" status=`expr $ret + $status` -echo "I:reloading with example2 using HUP and waiting 45 seconds" +echo "I:reloading with example2 using HUP and waiting up to 45 seconds" sleep 1 # make sure filesystem time stamp is newer for reload. rm -f ns2/example.db cp -f ns2/example2.db ns2/example.db kill -HUP `cat ns2/named.pid` -sleep 45 +try=0 +while test $try -lt 45 +do + sleep 1 + grep 'notify from 10.53.0.2#[0-9][0-9]*: serial 2$' ns3/named.run > /dev/null && break + try=`expr $try + 1` +done n=`expr $n + 1` echo "I:checking notify message was logged ($n)" @@ -95,7 +101,7 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1 [ $ret = 0 ] || echo "I:failed" status=`expr $ret + $status` -echo "I:stopping master and restarting with example4 then waiting 45 seconds" +echo "I:stopping master and restarting with example4 then waiting up to 45 seconds" $PERL $SYSTEMTESTTOP/stop.pl . ns2 rm -f ns2/example.db @@ -103,7 +109,13 @@ cp -f ns2/example4.db ns2/example.db $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns2 -sleep 45 +try=0 +while test $try -lt 45 +do + sleep 1 + grep 'notify from 10.53.0.2#[0-9][0-9]*: serial 4$' ns3/named.run > /dev/null && break + try=`expr $try + 1` +done n=`expr $n + 1` echo "I:checking notify message was logged ($n)"