Skip to content

Commit 8af910d

Browse files
exclude e2e batch tests from flink version 1.18 and older and add no-op spec change
1 parent 80763a6 commit 8af910d

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,24 @@ jobs:
173173
test: test_flink_operator_ha.sh
174174
- flink-version: v1_16
175175
test: test_snapshot.sh
176+
- flink-version: v1_16
177+
test: test_batch_job.sh
176178
- flink-version: v1_17
177179
test: test_dynamic_config.sh
178180
- flink-version: v1_17
179181
test: test_flink_operator_ha.sh
180182
- flink-version: v1_17
181183
test: test_snapshot.sh
184+
- flink-version: v1_17
185+
test: test_batch_job.sh
182186
- flink-version: v1_18
183187
test: test_dynamic_config.sh
184188
- flink-version: v1_18
185189
test: test_flink_operator_ha.sh
186190
- flink-version: v1_18
187191
test: test_snapshot.sh
192+
- flink-version: v1_18
193+
test: test_batch_job.sh
188194
- flink-version: v1_19
189195
test: test_snapshot.sh
190196
uses: ./.github/workflows/e2e.yaml

e2e-tests/test_batch_job.sh

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,30 @@
2020
# This script tests basic Flink batch job operations on Kubernetes:
2121
# 1. Deploys a FlinkDeployment for a batch job.
2222
# 2. Waits for the JobManager to become ready.
23-
# 3. Verifies that the job reaches the FINISHED state (first check).
24-
# 4. Sleeps for a configurable duration to test for state persistence.
25-
# 5. Verifies that the job remains in the FINISHED state (second check).
26-
# 6. Checks the operator logs for the expected job state transition message.
27-
# 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.
23+
# 3. Verifies that the job reaches the FINISHED state.
24+
# 4. Applies a no-op spec change and verifies the job remains in the FINISHED state.
25+
# 5. Checks the operator logs for the expected job state transition message.
26+
# 6. Checks the JobManager logs for successful application completion.
27+
# 7. Applies a spec change and verifies the job re-runs successfully.
2928
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
3029
source "${SCRIPT_DIR}/utils.sh"
3130

3231
CLUSTER_ID="flink-example-wordcount-batch"
3332
APPLICATION_YAML="${SCRIPT_DIR}/data/flinkdep-batch-cr.yaml"
3433
APPLICATION_IDENTIFIER="flinkdep/$CLUSTER_ID"
3534
TIMEOUT=300
36-
SLEEP_DURATION=30
3735

3836
on_exit cleanup_and_exit "$APPLICATION_YAML" $TIMEOUT $CLUSTER_ID
3937

4038
retry_times 5 30 "kubectl apply -f $APPLICATION_YAML" || exit 1
4139

4240
wait_for_jobmanager_running $CLUSTER_ID $TIMEOUT
4341

44-
# Wait for the job to reach the FINISHED state (first check).
42+
# Wait for the job to reach the FINISHED state.
4543
wait_for_status $APPLICATION_IDENTIFIER '.status.jobStatus.state' FINISHED $TIMEOUT || exit 1
4644

47-
echo "Job reached FINISHED state. Sleeping for $SLEEP_DURATION seconds..."
48-
sleep "$SLEEP_DURATION"
49-
50-
# Verify the job is *still* in the FINISHED state (second check).
45+
# Apply a no-op spec change; verify the job remains in the FINISHED state.
46+
kubectl patch flinkdep ${CLUSTER_ID} --type merge --patch '{"spec":{"flinkConfiguration": {"kubernetes.operator.deployment.readiness.timeout": "6h" } } }'
5147
wait_for_status $APPLICATION_IDENTIFIER '.status.jobStatus.state' FINISHED $TIMEOUT || exit 1
5248

5349
# Verify the job status change to FINISHED shows up in the operator logs.

0 commit comments

Comments
 (0)