You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if curl -sf "http://127.0.0.1:$PORT/sharechain/tip">/dev/null;thenbreak;fi
23
-
sleep 0.2
28
+
29
+
# Health-poll until the server answers, bounded by READY_TIMEOUT, and
30
+
# GATE the navigate on the result. If the port never comes up we fail
31
+
# loudly with a distinguishable infra message (not a page assertion) so
32
+
# a real regression is never confused with a server-start race. Also
33
+
# bail early if the server process died (e.g. port already in use).
34
+
echo"[2b] waiting up to ${READY_TIMEOUT}s for mock server at ${HEALTH_URL}"
35
+
start=$SECONDS
36
+
deadline=$((start + READY_TIMEOUT))
37
+
ready=0
38
+
while [ "$SECONDS"-lt"$deadline" ];do
39
+
if!kill -0 "$SERVER_PID"2>/dev/null;then
40
+
echo"::error::INFRA (not a page regression): mock server pid $SERVER_PID exited before binding :$PORT">&2
41
+
break
42
+
fi
43
+
if curl -sf "$HEALTH_URL">/dev/null 2>&1;then
44
+
ready=1
45
+
echo"mock server ready after $((SECONDS - start))s"
46
+
break
47
+
fi
48
+
sleep 0.5
24
49
done
50
+
if [ "$ready"-ne 1 ];then
51
+
echo"::error::INFRA (not a page regression): static mock server never became ready on 127.0.0.1:${PORT} within ${READY_TIMEOUT}s — puppeteer navigation skipped so a server-start race is not reported as a page-assertion failure.">&2
0 commit comments