Skip to content

Commit 6a9f0dc

Browse files
committed
fix(test): make spark connect test more robust
1 parent 486f4ab commit 6a9f0dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/templates/kuttl/spark-connect/10-assert.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ commands:
1818
# Sleep to prevent the following spark connect app from failing
1919
# while the spark-connect server is busy setting up the executors.
2020
- script: |
21-
sleep 10
22-
EXECUTOR_COUNT=$(kubectl get pods -n $NAMESPACE --selector 'spark-app-name=spark-connect-server' --field-selector='status.phase=Running' -o NAME|wc -l)
21+
# wait for the spark-connect-server-0 pod to become ready
22+
# this is to prevent the spark apps created in the following test steps to fail intermitently
23+
kubectl wait --for=condition=Ready pod/spark-connect-server-0 --namespace "$NAMESPACE" --timeout=3m
24+
25+
EXECUTOR_COUNT=$(kubectl get pods -n "$NAMESPACE" --selector 'spark-app-name=spark-connect-server' --field-selector='status.phase=Running' -o NAME|wc -l)
2326
test 1 -eq "$EXECUTOR_COUNT"

0 commit comments

Comments
 (0)