diff options
author | Gerald Kunzmann <kunzmann@docomolab-euro.com> | 2016-06-30 08:24:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-06-30 08:24:11 +0000 |
commit | d58db71c62c7ba0c067d2980b44319b3a3ff8a5d (patch) | |
tree | 5770b44edb00a3ba3e1da2c0de5a85f8523d2d66 /tests/run.sh | |
parent | d1597560d9ec5e6340604aca25ab055acb2b7e84 (diff) | |
parent | 2d55d6e7efc9f02a9de10a36627bec345e856c5d (diff) |
Merge "add timeout handle"
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-x | tests/run.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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() { |