From 8cdad6bedf1cfca2adcb3526d0f4e866bcceecc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Witold=20Kr=C4=99cicki?= Date: Thu, 14 Nov 2019 12:57:18 +0100 Subject: [PATCH] Fix timing issues in catz test Make the log checks more precise and use the retry() function for repeating the checks. (cherry picked from commit 9b43e65c01174aa86ff8ff95b5cc1ee961618a7b) --- bin/tests/system/catz/tests.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index f9cc5a9bc32..cb4c6fcf988 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -122,7 +122,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom1.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom1.example/IN: shutting down" > /dev/null && { ret=0 break } @@ -417,7 +417,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom5.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom5.example/IN: shutting down" > /dev/null && { ret=0 break } @@ -514,7 +514,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom6.example/IN: shutting down" > /dev/null && { ret=0 break } @@ -594,7 +594,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom6.example' from catalog 'catalog1.example' - success" > /dev/null && { ret=0 break } @@ -927,7 +927,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom9.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom9.example' from catalog 'catalog1.example' - success" > /dev/null && { ret=0 break } @@ -1118,7 +1118,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'this.is.a.very.very.long.long.long.domain.that.will.cause.catalog.zones.to.generate.hash.instead.of.using.regular.filename.dom10.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone this.is.a.very.very.long.long.long.domain.that.will.cause.catalog.zones.to.generate.hash.instead.of.using.regular.filename.dom10.example/IN: shutting down" > /dev/null && { ret=0 break } @@ -1322,7 +1322,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'dom11.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone dom11.example/IN: shutting down" > /dev/null && { ret=0 break } @@ -1365,7 +1365,7 @@ try=0 while test $try -lt 45 do sleep 1 - sed -n "$cur,"'$p' < ns2/named.run | grep "catz: deleting zone 'subdomain.of.dom11.example' from catalog 'catalog1.example'" > /dev/null && { + sed -n "$cur,"'$p' < ns2/named.run | grep "zone_shutdown: zone subdomain.of.dom11.example/IN: shutting down" > /dev/null && { ret=0 break } -- 2.47.3