diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2013-04-15 15:52:53 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-04-17 04:36:27 -0700 |
commit | 63098d9ff8dcfc08fd2ed83c62c4ffb63fc2126f (patch) | |
tree | 0914ae4c5dcc40dc0421e7efac0f737306e3a1a6 | |
parent | 28da431e5bedba64380cc3886cbab03c0d7a3cfd (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.
BUG: 874498
Change-Id: I7131699908e63b024d2dd71395b3e94c15fe925c
Original-author: Anand Avati <avati@redhat.com>
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4832
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | tests/bugs/bug-874498.t | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/bugs/bug-874498.t b/tests/bugs/bug-874498.t index a904d2e8b..a4121777d 100644 --- a/tests/bugs/bug-874498.t +++ b/tests/bugs/bug-874498.t @@ -45,19 +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 -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; |