From 320779d53ae013147d5e2556d2946c73e45734ab Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 10 Feb 2016 15:28:39 +0530 Subject: heal: Remove sleep() I wrote this program from a sample gfapi program which had sleep. I am not sure why this sleep was needed. So removing it now. Changed tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t to execute count_sh_entries every second, instead of comparing same value over and over. Change-Id: I7b89d6cab3e50bb7bf4d40a6064f2d8734155bea BUG: 1306199 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/13421 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Krutika Dhananjay --- heal/src/glfs-heal.c | 1 - tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 0be21bb57a4..c6c1161b05b 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -937,7 +937,6 @@ main (int argc, char **argv) goto out; } - sleep (2); top_subvol = glfs_active_subvol (fs); if (!top_subvol) { ret = -1; diff --git a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t index 2da960f6c7c..81655074c9c 100644 --- a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t +++ b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t @@ -39,8 +39,8 @@ 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 $CLI volume heal $V0 -EXPECT_WITHIN $HEAL_TIMEOUT '2' echo $(count_sh_entries $B0/$V0"0") -EXPECT_WITHIN $HEAL_TIMEOUT '2' echo $(count_sh_entries $B0/$V0"1") +EXPECT_WITHIN $HEAL_TIMEOUT '2' count_sh_entries $B0/$V0"0" +EXPECT_WITHIN $HEAL_TIMEOUT '2' count_sh_entries $B0/$V0"1" #Reset xattrs and trigger heal. TEST setfattr -n trusted.afr.$V0-client-1 -v 0x000000000000000000000000 $B0/${V0}0/datafile @@ -51,7 +51,7 @@ TEST setfattr -n trusted.afr.$V0-client-0 -v 0x000000000000000000000000 $B0/${V0 TEST $CLI volume heal $V0 EXPECT_WITHIN $HEAL_TIMEOUT "0" get_pending_heal_count $V0 -EXPECT_WITHIN $HEAL_TIMEOUT '0' echo $(count_sh_entries $B0/$V0"0") -EXPECT_WITHIN $HEAL_TIMEOUT '0' echo $(count_sh_entries $B0/$V0"1") +EXPECT_WITHIN $HEAL_TIMEOUT '0' count_sh_entries $B0/$V0"0" +EXPECT_WITHIN $HEAL_TIMEOUT '0' count_sh_entries $B0/$V0"1" cleanup -- cgit