We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c2d17e commit d518dfdCopy full SHA for d518dfd
1 file changed
examples/tiny-smoke/run.sh
@@ -59,7 +59,19 @@ trap cleanup EXIT
59
echo "[4/6] port-forward agent API via pod/${AGENT_POD}"
60
kubectl -n "${IMP_NS}" port-forward "pod/${AGENT_POD}" "${LOCAL_AGENT_PORT}:9091" >/tmp/imp-tiny-smoke-portforward.log 2>&1 &
61
PF_PID=$!
62
-sleep 2
+
63
+for _ in $(seq 1 40); do
64
+ if ss -lnt | awk '{print $4}' | grep -q ":${LOCAL_AGENT_PORT}$"; then
65
+ break
66
+ fi
67
+ sleep 0.5
68
+done
69
70
+if ! ss -lnt | awk '{print $4}' | grep -q ":${LOCAL_AGENT_PORT}$"; then
71
+ echo "agent API port-forward did not become ready" >&2
72
+ cat /tmp/imp-tiny-smoke-portforward.log >&2 || true
73
+ exit 1
74
+fi
75
76
echo "[5/6] execute connectivity check from ${CLIENT_VM} -> ${SERVER_IP}"
77
REQ_BODY="$(
0 commit comments