diff --git a/justfile b/justfile index bc05f6c..ad634d5 100644 --- a/justfile +++ b/justfile @@ -66,7 +66,7 @@ process-metrics-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -95,7 +95,7 @@ http-metrics-contract: --retry-interval=0 --segment-cache-max-age=1500ms --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -125,7 +125,7 @@ archive-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -160,7 +160,7 @@ plan-config-contract: --retry-interval=0 --no-verify "$@" >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -202,7 +202,7 @@ seam-handoff-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in $(seq 1 50); do - curl -sf "http://127.0.0.1:$PORT/healthz" >/dev/null 2>&1 && break + if body=$(curl -sf "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi sleep 0.2 done STREAM_SEAM_PORT=$PORT STREAM_SEAM_SIM_PORT=$SIMPORT \ @@ -233,7 +233,7 @@ cursor-lookback-contract: --retry-interval=0 --no-verify "$@" >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -357,7 +357,7 @@ subscribe-read-batch-contract: --subscribe-read-batch=17 >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -385,7 +385,7 @@ status-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done