Skip to content

Commit d16407c

Browse files
author
Tim Middleton
committed
More test updates
1 parent bf1cd01 commit d16407c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/build-kind.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ jobs:
6969
NAMESPACE=coherence-perf
7070
kubectl exec -it -n $NAMESPACE perf-cluster-0 -c coherence -- /coherence-operator/utils/cohctl get caches -o wide
7171
make deploy-test-schools
72+
JOB_NAME=perf-go-client
73+
echo "Waiting for pod from job $JOB_NAME to start running..."
74+
for i in {1..30}; do
75+
POD=$(kubectl get pods -n "$NAMESPACE" -l job-name="$JOB_NAME" -o jsonpath='{.items[0].metadata.name}')
76+
STATUS=$(kubectl get pod "$POD" -n "$NAMESPACE" -o jsonpath='{.status.phase}')
77+
echo "Pod: $POD, Status: $STATUS"
78+
if [[ "$STATUS" == "Running" ]]; then
79+
echo "Pod is running"
80+
break
81+
elif [[ "$STATUS" == "Pending" || "$STATUS" == "ContainerCreating" ]]; then
82+
sleep 2
83+
else
84+
echo "Pod entered unexpected state: $STATUS"
85+
kubectl describe pod "$POD" -n "$NAMESPACE"
86+
exit 1
87+
fi
88+
done
7289
# Put the tail into the background
7390
POD=$(kubectl get pods -n $NAMESPACE | grep perf-go-client | awk '{print $1}')
7491
kubectl logs $POD -n $NAMESPACE -f > build/_output/test-logs/perf-go-client.log 2>&1 &
@@ -81,7 +98,9 @@ jobs:
8198
CURL_PID=$!
8299
# Start the rolling restart
83100
./scripts/kind/roll-cluster.sh | tee build/_output/test-logs/rolling-restart.log
84-
kill -9 $CURL_PID && sleep 5 && kill -9 $PORT_FORWARD_PID && kill -9 $TAIL_PID
101+
kill -9 $CURL_PID || true
102+
sleep 5 && kill -9 $PORT_FORWARD_PID || true
103+
kill -9 $TAIL_PID || true
85104
86105
- name: Shutdown
87106
# if: github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)