E2E: Fix endless loop on error

This commit is contained in:
Tim Hockin 2021-10-05 15:29:04 -07:00
parent e2ed136aad
commit dfcafc9ca0
1 changed files with 9 additions and 3 deletions

View File

@ -1213,9 +1213,15 @@ function e2e::http() {
--http-pprof \
--link="link" \
>> "$1" 2>&1 &
while ! curl --silent --output /dev/null http://localhost:$BINDPORT; do
# do nothing, just wait for the HTTP to come up
true
# do nothing, just wait for the HTTP to come up
for i in $(seq 1 5); do
sleep 1
if curl --silent --output /dev/null http://localhost:$BINDPORT; then
break
fi
if [[ "$i" == 5 ]]; then
fail "HTTP server failed to start"
fi
done
# check that health endpoint fails