From: Ryota MIBU Date: Thu, 30 Jun 2016 08:28:57 +0000 (+0000) Subject: Merge "Add Dong Wenjuan as committer" X-Git-Tag: colorado.1.0~58 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=d0d774b729d53fc5aa0d1d7c410130abb520bd5a;hp=bd0255f204a017fef02d0752e5693a358db33543;p=doctor.git Merge "Add Dong Wenjuan as committer" --- diff --git a/tests/run.sh b/tests/run.sh index 56bacca7..d7240d24 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -166,12 +166,17 @@ stop_consumer() { wait_for_vm_launch() { echo "waiting for vm launch..." - while true + count=0 + while [[ ${count} -lt 60 ]] do state=$(nova list | grep " $VM_NAME " | awk '{print $6}') [[ "$state" == "ACTIVE" ]] && return 0 + [[ "$state" == "ERROR" ]] && echo "vm state is ERROR" && exit 1 + count=$(($count+1)) sleep 1 done + echo "ERROR: time out while waiting for vm launch" + exit 1 } inject_failure() {