diff --git a/.ci/load/scripts/load_agent.sh b/.ci/load/scripts/load_agent.sh index 3b5166aa13..cc97c5a8ab 100755 --- a/.ci/load/scripts/load_agent.sh +++ b/.ci/load/scripts/load_agent.sh @@ -20,6 +20,7 @@ set -exuo pipefail POLL_FREQ=1 +POLL_TIMEOUT=300 LOCUST_LOCUSTFILE="../locust.py" LOCUST_PRINT_STATS=1 @@ -86,11 +87,16 @@ function appIsReady() { } function waitForApp() { + counter=1 while : do if appIsReady; then break + elif [ $counter -gt $POLL_TIMEOUT ]; then + echo "Poll timeout exceeded. Exiting with error code: 1" + exit 1 fi + ((counter++)) sleep $POLL_FREQ; done }