Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure hotrod image is published at the end of e2e test #5764

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions scripts/hotrod-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,23 @@ poll_jaeger() {
}

# Polling loop
span_count=0
for ((i=1; i<=MAX_RETRIES; i++)); do
span_count=$(poll_jaeger "${TRACE_ID}")

if [[ "$span_count" -ge "$EXPECTED_SPANS" ]]; then
echo "Trace found with $span_count spans."
exit 0
break
fi

echo "Retry $i/$MAX_RETRIES: Trace not found or insufficient spans ($span_count/$EXPECTED_SPANS). Retrying in $SLEEP_INTERVAL seconds..."
sleep $SLEEP_INTERVAL
done

echo "Failed to find the trace with the expected number of spans within the timeout period."
exit 1
if [[ "$span_count" -lt "$EXPECTED_SPANS" ]]; then
echo "Failed to find the trace with the expected number of spans within the timeout period."
exit 1
fi

# Ensure the image is published after successful test (no -l flag)
bash scripts/build-upload-a-docker-image.sh -c example-hotrod -d examples/hotrod -p "${platforms}"
Loading