From 553fc7dc7a4c28b1126c3b7b1fb37cfb223068ca Mon Sep 17 00:00:00 2001 From: Jonathan Ruddell Date: Tue, 2 Apr 2019 17:54:27 -0400 Subject: [PATCH] improve e2e test to wait for a 200 response from the backend --- test/scripts/run-detox-tests.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/scripts/run-detox-tests.sh b/test/scripts/run-detox-tests.sh index 8e066e85c..fa2d4532c 100755 --- a/test/scripts/run-detox-tests.sh +++ b/test/scripts/run-detox-tests.sh @@ -7,10 +7,10 @@ nohup ./mvnw & # wait for the backend to start # see https://github.com/jhipster/generator-jhipster/blob/2a803eca36f21079320c602645e13c177f6c6ea9/test-integration/scripts/24-tests-e2e.sh retryCount=1 -maxRetry=10 -httpUrl="http://localhost:8080" +maxRetry=30 +httpUrl="http://localhost:8080/management/health" -rep=$(curl -v "$httpUrl") +rep=$(curl -v -f "$httpUrl") status=$? while [ "$status" -ne 0 ] && [ "$retryCount" -le "$maxRetry" ]; do echo "*** [$(date)] Application not reachable yet. Sleep and retry - retryCount =" $retryCount "/" $maxRetry @@ -25,8 +25,6 @@ if [ "$status" -ne 0 ]; then return 1 fi -sleep 60 - cd ../${JHI_IGNITE_APP_NAME} # if oauth, only run the launch screen since you need to authenticate for entities (todo: mock auth for entities)