[sheepdog] [PATCH v2] tests: make _wait_for_sheep run faster

Liu Yuan namei.unix at gmail.com
Fri Jun 21 04:02:12 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/functional/common.rc |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 1ef9992..1dde0ab 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
@@ -217,6 +215,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