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