[sheepdog] [PATCH v3] tests: make _wait_for_sheep run faster
Liu Yuan
namei.unix at gmail.com
Fri Jun 21 06:51:46 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
tests/functional/common.rc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 1ef9992..4b45701 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -195,8 +195,6 @@ _wait_for_sheep()
PORT=$((7000 + $2))
fi
while true; do
- sleep 2
-
if [ $(_count_sheep_processes) != $1 ]; then
_die "should have $1, but have $(_count_sheep_processes) sheep"
fi
@@ -205,6 +203,7 @@ _wait_for_sheep()
if [ $? != 0 ]; then
# sheep is not ready yet
+ sleep 1
continue
fi
@@ -217,6 +216,7 @@ _wait_for_sheep()
if [ ${nr_sheep} -gt $1 ]; then
_die "ERROR: too many sheep in cluster: ${nr_sheep}, expect: $1"
fi
+ sleep 1
done
}
--
1.7.9.5
More information about the sheepdog
mailing list