We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64c1ca3 commit fd8ba68Copy full SHA for fd8ba68
.github/scripts/end2end/setup-e2e-env.sh
@@ -44,7 +44,8 @@ if ! ss -tlnp 2>/dev/null | grep -q ":${MONGO_PORT}" && \
44
trap "kill ${_MONGO_PF_PID} 2>/dev/null || true" EXIT
45
export _SETUP_E2E_CLEANUP_SET=1
46
fi
47
- sleep 2
+ # Wait until the port is actually listening (poll every 200ms, fail after 10s)
48
+ timeout 10 bash -c "until ss -tlnp 2>/dev/null | grep -q ':${MONGO_PORT}'; do sleep 0.2; done"
49
50
export MONGO_REPLICA_SET_HOSTS="localhost:${MONGO_PORT}"
51
0 commit comments