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