Skip to content

Commit 59befec

Browse files
author
Shane Wall
committed
demo/postgres-survive-kill9/ci-smoke.sh now tries the metrics endpoint from inside the loader container and via the host port mapping, with a longer wait (up to ~6 minutes). This covers cases where the service mapping isn’t immediately reachable on the host.
1 parent 8d51eb3 commit 59befec

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

demo/postgres-survive-kill9/ci-smoke.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ wait_pgbench_tables() {
3939

4040
wait_metrics() {
4141
echo "Waiting for metrics endpoint..."
42-
for _ in {1..120}; do
43-
if docker compose exec -T loader curl -sf http://postgres:9911/metrics | grep -q diffkeeper_recovery_total; then
42+
for _ in {1..180}; do
43+
# Prefer in-cluster check via loader; fallback to host port mapping if needed
44+
if docker compose exec -T loader curl -sf http://postgres:9911/metrics 2>/dev/null | grep -q diffkeeper_recovery_total; then
45+
return
46+
fi
47+
if curl -sf http://localhost:9911/metrics 2>/dev/null | grep -q diffkeeper_recovery_total; then
4448
return
4549
fi
4650
sleep 2

0 commit comments

Comments
 (0)