From 83b7c2304457905f181df4d781b76dec398097b4 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 16 Mar 2018 12:32:09 +0100 Subject: [PATCH] Add wait until 200 Signed-off-by: Pavol Loffay --- scripts/travis/hotrod-integration-test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/travis/hotrod-integration-test.sh b/scripts/travis/hotrod-integration-test.sh index c3e51f6aebf..06cc6c233e8 100755 --- a/scripts/travis/hotrod-integration-test.sh +++ b/scripts/travis/hotrod-integration-test.sh @@ -6,6 +6,11 @@ make docker-hotrod export REPO=jaegertracing/example-hotrod export CID=$(docker run -d -p 8080:8080 $REPO:latest) +i=0 +while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8080)" != "200" && ${i} < 5 ]]; do + sleep 1 + i=$((i+1)) +done body=$(curl localhost:8080) if [[ $body != *"Rides On Demand"* ]]; then echo "String \"Rides On Demand\" is not present on the index page"