path: root/tests/afr.rc
diff options
authorPranith Kumar K <>2018-08-10 12:46:20 +0530
committerAtin Mukherjee <>2018-08-12 08:27:20 +0000
commit488dcc17b76b1b46c13ccd269b7a092c014a4d94 (patch)
treeedef46562cc87b0ef66f336f7ea25e0433eb26f4 /tests/afr.rc
parentbd8fc26a278697c30537d879ea5402db7ebab577 (diff)
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 <>
Diffstat (limited to 'tests/afr.rc')
1 files changed, 8 insertions, 0 deletions
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}'