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

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Jun 21 05:31:06 CEST 2013


At Fri, 21 Jun 2013 10:02:12 +0800,
Liu Yuan wrote:
> 
> 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
>  }

Well, no need to sleep when 'collie node list' fails (when sheep is
not ready)?

Thanks,

Kazutaka



More information about the sheepdog mailing list