From 488dcc17b76b1b46c13ccd269b7a092c014a4d94 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 10 Aug 2018 12:46:20 +0530 Subject: Make sure EXPECT_WITHIN executes the statement multiple times When we pass a command to be executed in EXPECT_WITHIN and we use `` the value is passed by value, so if the first execution gives a result that is different from the expected value, EXPECT_WITHIN test will fail because the command will not be re-evaluated. Changed the expression with `` to a function. Added sleep(3) in afr.c for reconfigure to both RC and re-test after the change. fixes bz#1614662 Change-Id: I3bc8a75b996729261aa48067f6ed8da9c6273b13 Signed-off-by: Pranith Kumar K --- tests/afr.rc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/afr.rc') diff --git a/tests/afr.rc b/tests/afr.rc index 12cbd974cd7..f253e77561e 100644 --- a/tests/afr.rc +++ b/tests/afr.rc @@ -97,3 +97,11 @@ function afr_up_status() local replica_id=$3 grep -E "^up = " $m/.meta/graphs/active/${v}-replicate-${replica_id}/private | cut -f2 -d'=' } + +function get_quorum_type() +{ + local m="$1" + local v="$2" + local repl_id="$3" + cat $m/.meta/graphs/active/$v-replicate-$repl_id/private|grep quorum-type|awk '{print $3}' +} -- cgit