Skip to content

Commit 80763a6

Browse files
Tweaks to e2e test
1 parent f34482d commit 80763a6

File tree

3 files changed

+8
-22
lines changed

3 files changed

+8
-22
lines changed

.github/workflows/e2e.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ jobs:
8888
EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar"
8989
if [[ ${{ inputs.flink-version }} == v2* ]]; then
9090
EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming/2.0-preview1/flink-examples-streaming-2.0-preview1.jar"
91+
elif [[ "${{ inputs.test }}" == "test_batch_job.sh" ]]; then
92+
EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming/1.20.1/flink-examples-streaming-1.20.1.jar"
9193
fi
9294
ESCAPED_EXAMPLES_JAR=$(printf '%s\n' "$EXAMPLES_JAR" | sed -e 's/[\/&]/\\&/g')
9395

e2e-tests/data/flinkdep-batch-cr.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ spec:
3131
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
3232
flinkConfiguration:
3333
taskmanager.numberOfTaskSlots: "2"
34-
high-availability.type: kubernetes
35-
high-availability.storageDir: file:///opt/flink/volume/flink-ha
36-
state.checkpoints.dir: file:///opt/flink/volume/flink-cp
37-
state.savepoints.dir: file:///opt/flink/volume/flink-sp
3834
kubernetes.operator.snapshot.resource.enabled: "false"
3935
serviceAccount: flink
4036
podTemplate:
@@ -59,14 +55,9 @@ spec:
5955
volumeMounts:
6056
- mountPath: /opt/flink/usrlib
6157
name: flink-artifact
62-
- mountPath: /opt/flink/volume
63-
name: flink-volume
6458
volumes:
6559
- name: flink-artifact
6660
emptyDir: { }
67-
- name: flink-volume
68-
persistentVolumeClaim:
69-
claimName: flink-example-wordcount-batch
7061
jobManager:
7162
resource:
7263
memory: "1024m"
@@ -83,19 +74,6 @@ spec:
8374
upgradeMode: stateless
8475
mode: native
8576

86-
---
87-
apiVersion: v1
88-
kind: PersistentVolumeClaim
89-
metadata:
90-
name: flink-example-wordcount-batch
91-
spec:
92-
accessModes:
93-
- ReadWriteOnce
94-
volumeMode: Filesystem
95-
resources:
96-
requests:
97-
storage: 1Gi
98-
9977
---
10078
apiVersion: networking.k8s.io/v1
10179
kind: IngressClass

e2e-tests/test_batch_job.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
# 5. Verifies that the job remains in the FINISHED state (second check).
2626
# 6. Checks the operator logs for the expected job state transition message.
2727
# 7. Checks the JobManager logs for successful application completion.
28+
# 8. Applies a spec change to the FlinkDeployment and verifies the job re-runs successfully.
2829
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
2930
source "${SCRIPT_DIR}/utils.sh"
3031

@@ -57,4 +58,9 @@ wait_for_operator_logs "$operator_pod_name" "Job status changed from .* to FINIS
5758
jm_pod_name=$(get_jm_pod_name $CLUSTER_ID)
5859
wait_for_logs "$jm_pod_name" "Application completed SUCCESSFULLY" ${TIMEOUT} || exit 1
5960

61+
# Apply a spec change; verify the job re-runs and reaches the FINISHED state.
62+
kubectl patch flinkdep ${CLUSTER_ID} --type merge --patch '{"spec":{"job": {"parallelism": 1 } } }'
63+
wait_for_status $APPLICATION_IDENTIFIER '.status.jobStatus.state' RECONCILING $TIMEOUT || exit 1
64+
wait_for_status $APPLICATION_IDENTIFIER '.status.jobStatus.state' FINISHED $TIMEOUT || exit 1
65+
6066
echo "Successfully ran the batch job test"

0 commit comments

Comments
 (0)