From: Kai Zhang <kyle at zelin.io> v2: - fixed indention error Signed-off-by: Kai Zhang <kyle at zelin.io> Signed-off-by: Liu Yuan <namei.unix at gmail.com> --- tests/functional/common.rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/functional/common.rc b/tests/functional/common.rc index 88f4c24..1ef9992 100644 --- a/tests/functional/common.rc +++ b/tests/functional/common.rc @@ -209,12 +209,13 @@ _wait_for_sheep() fi nr_sheep="$(echo "$node_list" | wc -l)" + nr_sheep=$(($nr_sheep-1)) - if [ ${nr_sheep} -eq $(($1+1)) ]; then + if [ ${nr_sheep} -eq $1 ]; then break fi - if [ ${nr_sheep} -gt $(($1+1)) ]; then - _die "ERROR: too many sheep in cluster: ${nr_sheep}" + if [ ${nr_sheep} -gt $1 ]; then + _die "ERROR: too many sheep in cluster: ${nr_sheep}, expect: $1" fi done } -- 1.8.1.2 |