From 0c2f0e02f20d9b87b2c3ad273e5e1fd252dc8a2e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 18 May 2020 16:47:07 +1000 Subject: [PATCH] Wait longer (up to 20 secs) for journal to be truncated --- bin/tests/system/nsupdate/tests.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 4c5b7391131..f190f7f4105 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -842,14 +842,11 @@ size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->siz [ "$size" -gt 6000 ] || ret=1 sleep 1 $RNDCCMD 10.53.0.1 sync maxjournal.test -for i in 1 2 3 4 5 6 -do - sleep 1 +check_size_lt_5000() ( size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->size);' ns1/maxjournal.db.jnl` - [ "$size" -lt 5000 ] && break -done -size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->size);' ns1/maxjournal.db.jnl` -[ "$size" -lt 5000 ] || ret=1 + [ "$size" -lt 5000 ] +) +retry_quiet 20 check_size_lt_5000 || ret=1 [ $ret = 0 ] || { echo_i "failed"; status=1; } n=`expr $n + 1` -- 2.47.3