Replace sleep with wait-for-tcp script in run-tests.sh and CI workflow to improve reliability of smoke tests. Update TESTING.md to include prerequisites for the new script.
All checks were successful
Smoke tests / Build and smoke test (push) Successful in 1m17s

This commit is contained in:
AI Agent
2026-03-19 15:47:21 -06:00
parent 1a545bbae7
commit 0914b5a32b
4 changed files with 29 additions and 11 deletions

13
scripts/ci/wait-for-tcp.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
host=${1:-127.0.0.1}
port=${2:-2222}
max_attempts=${3:-30}
for _ in $(seq 1 "$max_attempts"); do
if nc -z -w 1 "$host" "$port" 2>/dev/null; then
exit 0
fi
sleep 1
done
echo "timeout waiting for $host:$port" >&2
exit 1