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

Liu Yuan namei.unix at gmail.com
Thu Jun 20 09:34:56 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..3f5a46a 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
 
-- 
1.7.9.5




More information about the sheepdog mailing list