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