Skip to content

Commit

Permalink
Ensure hotrod image is published at the end of e2e test (jaegertracin…
Browse files Browse the repository at this point in the history
  • Loading branch information
yurishkuro authored Jul 19, 2024
1 parent edfee78 commit 813ff32
Showing 1 changed file with 9 additions and 3 deletions.
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}"

0 comments on commit 813ff32

Please sign in to comment.