Skip to content

Commit

Permalink
Update run-detox-tests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Feb 22, 2024
1 parent f03c1ff commit 81cd790
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions test/scripts/run-detox-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,7 @@ if [ "$JHI_AUTH_TYPE" = "jwt" ] ; then
./mvnw -ntp &

# 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=60
httpUrl="http://localhost:8080/management/health"
rep=$(curl -fv "$httpUrl")
status=$?
while [ "$status" -ne 0 ] && [ "$retryCount" -le "$maxRetry" ]; do
echo "*** [$(date)] Backend not reachable yet. Sleep and retry - retryCount =" $retryCount "/" $maxRetry
retryCount=$((retryCount+1))
sleep 5
rep=$(curl -fv "$httpUrl")
status=$?
echo "."
done

if [ "$status" -ne 0 ]; then
echo "*** [$(date)] Backend not connected after" $retryCount " retries."
exit 1
fi
npm run ci:server:await
else
echo "Skipping starting backend for OAuth2"
echo "TODO: Mock Auth so that the entity pages can be tested"
Expand Down

0 comments on commit 81cd790

Please sign in to comment.