Skip to content

Commit

Permalink
improve e2e test to wait for a 200 response from the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Apr 2, 2019
1 parent e02f074 commit 553fc7d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/scripts/run-detox-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 553fc7d

Please sign in to comment.