fix(runtime): harden mobile QR smoke output (#2417)

Harvested from #2415 with thanks to @axobase001.

Keeps the denser mobile QR renderer and replaces the fixed binding-warning sleep with health polling plus an explicit timeout failure path, so slow starts fail with the useful cause instead of drifting into misleading assertions.

Follow-up to #2403.
This commit is contained in:
Hunter Bown
2026-05-31 02:48:41 -07:00
committed by GitHub
parent 6e8477334d
commit 0dd7f0b802
2 changed files with 15 additions and 2 deletions
+14 -1
View File
@@ -155,7 +155,20 @@ log "=== Test Group 3: Binding warnings (0.0.0.0 default) ==="
STDOUT_FILE=$(mktemp)
"$BINARY" serve --port "$PORT" --mobile --insecure > "$STDOUT_FILE" 2>&1 &
SERVER_PID=$!
sleep 2
SERVER_READY=0
for _ in $(seq 1 30); do
if curl -sf "http://127.0.0.1:${PORT}/health" > /dev/null 2>&1; then
SERVER_READY=1
break
fi
sleep 0.3
done
if [[ "$SERVER_READY" -ne 1 ]]; then
rm -f "$STDOUT_FILE"
fail "Server did not become ready on port $PORT"
cleanup
exit 1
fi
STDOUT=$(cat "$STDOUT_FILE")
rm -f "$STDOUT_FILE"