f338ef
From 7a04fb9999f5d25c17f5593eed5e98d0f5a1932d Mon Sep 17 00:00:00 2001
f338ef
From: karthik-us <ksubrahm@redhat.com>
f338ef
Date: Mon, 15 Jul 2019 14:30:52 +0530
f338ef
Subject: [PATCH 251/255] tests: Fix
f338ef
 bug-1717819-metadata-split-brain-detection.t failure
f338ef
f338ef
<Backport of: https://review.gluster.org/#/c/glusterfs/+/23043/>
f338ef
f338ef
Problem:
f338ef
tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t fails
f338ef
intermittently in test cases #49 & #50, which compare the values of the
f338ef
user set xattr values after enabling the heal. We are not waiting for
f338ef
the heal to complete before comparing those values, which might lead
f338ef
those tests to fail.
f338ef
f338ef
Fix:
f338ef
Wait till the HEAL-TIMEOUT before comparing the xattr values.
f338ef
Also cheking for the shd to come up and the bricks to connect to the shd
f338ef
process in another case.
f338ef
f338ef
Change-Id: I0021c2d5d251111c695e2bf18c63e8189e456114
f338ef
fixes: bz#1704562
f338ef
Signed-off-by: karthik-us <ksubrahm@redhat.com>
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/176071
f338ef
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
---
f338ef
 tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t | 6 ++++++
f338ef
 1 file changed, 6 insertions(+)
f338ef
f338ef
diff --git a/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t b/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t
f338ef
index 94b8bf3..76d1f21 100644
f338ef
--- a/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t
f338ef
+++ b/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t
f338ef
@@ -76,6 +76,10 @@ EXPECT_WITHIN $HEAL_TIMEOUT "^1$" get_pending_heal_count $V0
f338ef
 
f338ef
 # Launch heal
f338ef
 TEST $CLI volume heal $V0 enable
f338ef
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^Y$" glustershd_up_status
f338ef
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 0
f338ef
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 1
f338ef
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 2
f338ef
 TEST $CLI volume heal $V0
f338ef
 EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
 
f338ef
@@ -117,6 +121,8 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^Y$" glustershd_up_status
f338ef
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 0
f338ef
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 1
f338ef
 EXPECT_WITHIN $CHILD_UP_TIMEOUT "^1$" afr_child_up_status_in_shd $V0 2
f338ef
+TEST $CLI volume heal $V0
f338ef
+EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
 
f338ef
 B0_XATTR=$(getfattr -n 'user.metadata' --absolute-names --only-values $B0/${V0}0/dir/file)
f338ef
 B1_XATTR=$(getfattr -n 'user.metadata' --absolute-names --only-values $B0/${V0}1/dir/file)
f338ef
-- 
f338ef
1.8.3.1
f338ef