🔍 test: show readiness HTTP response during shutdown window
All checks were successful
CI/CD Pipeline / Build Docker Cache (push) Successful in 9s
CI/CD Pipeline / CI Pipeline (push) Successful in 4m15s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped

Print the full response body and status code from the /api/ready probe
that fires during the graceful shutdown window, so the 200→503 transition
is visible in test output rather than silently discarded.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 19:57:01 +02:00
parent 928fa9170c
commit 165e082eb9

View File

@@ -75,7 +75,8 @@ fi
kill -TERM "$SERVER_PID" kill -TERM "$SERVER_PID"
# Brief yield so the signal handler runs and CancelableContext.Cancel() fires # Brief yield so the signal handler runs and CancelableContext.Cancel() fires
sleep 0.2 sleep 0.2
curl -s http://localhost:8080/api/ready > /dev/null 2>&1 || true READY_DURING_SHUTDOWN=$(curl -s -w "\n[HTTP %{http_code}]" http://localhost:8080/api/ready 2>&1 || echo "[connection refused]")
echo "Readiness during shutdown: $READY_DURING_SHUTDOWN"
# Wait for the process to exit cleanly (up to 30s) without sending another signal # Wait for the process to exit cleanly (up to 30s) without sending another signal
echo "Waiting for server to exit..." echo "Waiting for server to exit..."