Fix flaky unit test on merge-triggered CI runs (#7)
CI / build-and-scan (push) Successful in 1m4s

- entrypoint.sh: bound the target connectivity check with `-w 2` (the only unbounded step in the startup path)
- tests/entrypoint.bats: widen wait_for_log's budget from 5s to 10s

Merge-triggered runs land on a colder runner (Docker cache evicted by other repos' scheduled jobs since the PR was last tested) than PR-check runs, and the first backgrounded entrypoint.sh in the suite was occasionally landing just past the old 5s window — always passed on rerun once warm.
This commit was merged in pull request #7.
This commit is contained in:
2026-08-26 15:58:36 +02:00
parent 4acab3e3c6
commit 1f0af15932
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ fi
log "[~] Testing connection to target..."
# Test if we can reach the target before starting socat
if ! nc -z "$TARGET_HOST" "$TARGET_PORT" 2>/dev/null; then
if ! nc -z -w 2 "$TARGET_HOST" "$TARGET_PORT" 2>/dev/null; then
log "[!] Cannot connect to $TARGET_HOST:$TARGET_PORT - socat will retry automatically"
else
log "[✓] Connection to $TARGET_HOST:$TARGET_PORT is working"