summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-06-15 16:19:15 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-16 03:15:32 -0700
commit7342076f420efd62c9c46cdf5454b283225d1ec8 (patch)
tree6c227f4f5060778692af5325cf1a9d3e496ad43f /tests/bugs
parent47230eb38d96e51d2d5e976eda7ff82c62f6eedd (diff)
tests: Validate self-heal daemon completions
Removed sleep with EXPECT_WITHIN Heal full doesn't generate indices until the files/dirs are recreated. So wait until they are re-created and then wait for heal completion. Change-Id: I82399f6a17f94ecc101db45b83d8ef7bfa9c64dd BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8069 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs')
-rwxr-xr-xtests/bugs/bug-859581.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/bugs/bug-859581.t b/tests/bugs/bug-859581.t
index 0aab48bb02b..4253ab5d88b 100755
--- a/tests/bugs/bug-859581.t
+++ b/tests/bugs/bug-859581.t
@@ -12,7 +12,9 @@ EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume start $V0
EXPECT 'Started' volinfo_field $V0 'Status';
# Needed to be sure self-heal daemon is running
-sleep 5
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1
TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0;
@@ -22,6 +24,7 @@ TEST rm -f $(gf_get_gfid_backend_file_path $B0/${V0}1 "dir1")
TEST rmdir $B0/${V0}1/dir1/dir2
TEST $CLI volume heal $V0 full
+EXPECT_WITHIN $HEAL_TIMEOUT "Y" path_exists $B0/${V0}1/dir1/dir2
EXPECT_WITHIN $HEAL_TIMEOUT "0" afr_get_pending_heal_count $V0
TEST [ -d $B0/${V0}1/dir1/dir2 ]