[sheepdog] [RFC PATCH 2/3] test: fix spurious failture of 001 002

MORITA Kazutaka morita.kazutaka at gmail.com
Mon Nov 5 08:24:04 CET 2012


At Sat,  3 Nov 2012 23:09:46 +0800,
Liu Yuan wrote:
> 
> From: Liu Yuan <tailai.ly at taobao.com>
> 
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  tests/001 |    4 +++-
>  tests/002 |    1 +
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/001 b/tests/001
> index b1df143..a4c03b7 100755
> --- a/tests/001
> +++ b/tests/001
> @@ -24,6 +24,7 @@ _wait_for_sheep 2
>  
>  # start Sheepdog with two nodes
>  $COLLIE cluster format
> +sleep 1
>  
>  # kill the master node
>  _kill_sheep 0
> @@ -50,9 +51,10 @@ $COLLIE cluster info -p 7002 | _filter_cluster_info
>  # add the other nodes
>  for i in 0 1; do
>      _start_sheep $i
> -    sleep 1

This test expects that sheep0 joins before sheep1, so sleeping here
looks necessary.

Thanks,

Kazutaka

>  done
>  
> +_wait_for_sheep 3
> +
>  echo check whether all nodes have the same cluster info
>  for i in 0 1 2; do
>      $COLLIE cluster info -p 700$i | _filter_cluster_info
> diff --git a/tests/002 b/tests/002
> index 0644199..39be8ea 100755
> --- a/tests/002
> +++ b/tests/002
> @@ -23,6 +23,7 @@ _wait_for_sheep 3
>  
>  # start Sheepdog with three nodes
>  $COLLIE cluster format
> +sleep 1
>  
>  # kill all sheeps
>  for i in 0 1 2; do
> -- 
> 1.7.9.5
> 



More information about the sheepdog mailing list