Skip to content

Commit fa64c84

Browse files
rostalancursoragent
andcommitted
fix(smoketest): increase readiness wait to 5 minutes (redhat-developer#2609)
Use a fixed 30x10s readiness polling window so smoke tests have enough startup time when loading many plugins. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f8f6427 commit fa64c84

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/run-workspace-smoke-tests.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,26 @@ jobs:
127127
128128
- name: Wait for RHDH to be ready
129129
run: |
130-
set -e
131-
for i in $(seq 1 10); do
130+
set -euo pipefail
131+
TOTAL_ATTEMPTS=30
132+
SLEEP_SECONDS=10
133+
134+
TOTAL_WAIT_SECONDS=$(( TOTAL_ATTEMPTS * SLEEP_SECONDS ))
135+
TOTAL_WAIT_MINUTES=$(( TOTAL_WAIT_SECONDS / 60 ))
136+
echo "Readiness window: ${TOTAL_ATTEMPTS} attempts x ${SLEEP_SECONDS}s (~${TOTAL_WAIT_MINUTES}m)"
137+
138+
for i in $(seq 1 "$TOTAL_ATTEMPTS"); do
132139
if curl -fsS http://localhost:7007/health >/dev/null; then
133140
echo "RHDH is ready"; exit 0; fi
134-
echo "Waiting for RHDH... (Attempt ${i}/10)"
141+
echo "Waiting for RHDH... (Attempt ${i}/${TOTAL_ATTEMPTS})"
135142
# Check if container is still running
136143
if ! docker ps | grep -q rhdh; then
137144
echo "Container stopped unexpectedly."
138145
exit 1
139146
fi
140-
sleep 10
147+
sleep "$SLEEP_SECONDS"
141148
done
142-
echo "RHDH did not become ready in time."
149+
echo "RHDH did not become ready in time after ${TOTAL_WAIT_SECONDS}s."
143150
exit 1
144151
145152
- name: List installed plugins

0 commit comments

Comments
 (0)