diff --git a/scripts/verify_allocated_compose.sh b/scripts/verify_allocated_compose.sh index 82ca1c5b..1ccbfd33 100755 --- a/scripts/verify_allocated_compose.sh +++ b/scripts/verify_allocated_compose.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -Eeuo pipefail # Independent allocated-flow fixture for multiplayer-next.md ยง8.48. This # intentionally does not call compose.phase6-smoke.yml or reuse its ports. @@ -88,7 +88,12 @@ for attempt in $(seq 1 180); do if "${compose[@]}" logs game-server 2>/dev/null | grep -q ' server_started '; then break fi - if ! "${compose[@]}" ps --status running --services | grep -qx game-server; then + # Ask whether it EXITED, not whether it is absent from the running list. + # Those differ: a container that has been created but has not started yet is + # missing from --status running too, so the previous check called a + # still-starting server dead on the first poll. It failed intermittently + # against a game server whose own logs showed a clean `server_started`. + if "${compose[@]}" ps -a --status exited --services 2>/dev/null | grep -qx game-server; then "${compose[@]}" logs game-server >&2 echo "allocated Compose game server exited before becoming ready" >&2 exit 1