diff options
author | Anand Avati <avati@redhat.com> | 2013-04-05 16:26:53 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-04-09 12:55:19 -0700 |
commit | f364d542aaf272c14b1d6ef7c9ac805db0fdb45c (patch) | |
tree | 4e712c96fdf971bcb773e834b57123ae9f84b8ed /tests/bugs/bug-874498.t | |
parent | cf48bea3b298ea9aa35d82848a77b6bf681265d6 (diff) |
tests: fix dependency on sleep in bug-874498.t
With the introduction of http://review.gluster.org/4784, there are
delays which breaks bug-874498.t which wrongly depends on healing
to finish within 2 seconds.
Fix this by using 'EXPECT_WITHIN 60' instead of sleep 2.
Change-Id: I2716d156c977614c719665a5e1f159dabf2878b5
BUG: 874498
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4796
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/bug-874498.t')
-rw-r--r-- | tests/bugs/bug-874498.t | 22 |
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; |