Skip to content

Commit 60538a2

Browse files
committed
fix: Spark-connect test timing issues
1 parent f8be252 commit 60538a2

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
apiVersion: kuttl.dev/v1beta1
33
kind: TestAssert
4-
timeout: 300
4+
timeout: 600
55
---
66
apiVersion: apps/v1
77
kind: StatefulSet
@@ -23,20 +23,3 @@ metadata:
2323
name: spark-connect-server-headless
2424
spec:
2525
type: ClusterIP
26-
---
27-
apiVersion: kuttl.dev/v1beta1
28-
kind: TestAssert
29-
timeout: 300
30-
commands:
31-
# Test that spark connect executors are running.
32-
# Sleep to prevent the following spark connect app from failing
33-
# while the spark-connect server is busy setting up the executors.
34-
- script: |
35-
# wait for the spark-connect CR to become available
36-
kubectl wait --for=condition=Available sparkconnectservers/spark-connect --namespace "$NAMESPACE" --timeout=3m
37-
38-
EXECUTOR_COUNT=$(kubectl get pods -n "$NAMESPACE" --selector 'spark-app-name=spark-connect-server' --field-selector='status.phase=Running' -o NAME|wc -l)
39-
test 1 -eq "$EXECUTOR_COUNT"
40-
41-
# wait a little longer to increase the chance apps being able to connect
42-
sleep 5
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
timeout: 600
5+
commands:
6+
# Test that spark connect executors are running.
7+
# Sleep to prevent the following spark connect app from failing
8+
# while the spark-connect server is busy setting up the executors.
9+
- script: |
10+
# wait for the spark-connect CR to become available
11+
kubectl wait --for=condition=Ready pod -l spark-app-name=spark-connect-server -n "$NAMESPACE" --timeout=10m
12+
13+
# wait a little longer to increase the chance apps being able to connect
14+
sleep 10

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kuttl.dev/v1beta1
33
kind: TestAssert
44
metadata:
55
name: simple-connect-app
6-
timeout: 300
6+
timeout: 600
77
---
88
apiVersion: batch/v1
99
kind: Job

tests/templates/kuttl/spark-connect/20-run-connect-client.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
template:
5555
spec:
5656
restartPolicy: OnFailure
57-
activeDeadlineSeconds: 100
57+
activeDeadlineSeconds: 600
5858
containers:
5959
- name: simple-connect-app
6060
{% if test_scenario['values']['spark-connect-client'].find(",") > 0 %}

0 commit comments

Comments
 (0)