Skip to content

Commit c16d0e5

Browse files
authored
fix(test): make spark connect test more robust (#587)
* fix(test): make spark connect test more robust * review feedback
1 parent 486f4ab commit c16d0e5

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 CR to become available
22+
# this is to prevent the spark apps created in the following test steps to fail intermitently
23+
kubectl wait --for=condition=Available sparkconnectservers/spark-connect --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)