summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-874498.t22
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/bugs/bug-874498.t b/tests/bugs/bug-874498.t
index 35430f1ad53..469a0e3a4c4 100644
--- a/tests/bugs/bug-874498.t
+++ b/tests/bugs/bug-874498.t
@@ -45,20 +45,26 @@ done
EXPECT "3" echo $count
+function count_entries()
+{
+ val1=0
+##count the number of entries after self heal
+ for g in `ls $1`
+ do
+ val1=$(( val1 + 1 ))
+ done
+
+ echo $val1;
+}
+
TEST $CLI volume start $V0 force
sleep 5
TEST $CLI volume heal $V0 full
-sleep 2
-val1=0
-##count the number of entries after self heal
-for g in `ls $FILEN`
-do
-val1=$(( val1 + 1 ))
-done
##Expected number of entries are 0 in the .glusterfs/indices/xattrop directory
-EXPECT '0' echo $val1
+EXPECT_WITHIN 60 '0' count_entries $FILEN;
+
TEST $CLI volume stop $V0;
TEST $CLI volume delete $V0;