Skip to content

Commit d325322

Browse files
committed
Skip last-state test for Flink 1.16
1 parent 24f0742 commit d325322

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

e2e-tests/test_sessionjob_operations.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,23 @@ assert_available_slots 1 $CLUSTER_ID
6868

6969
echo "Successfully run the sessionjob savepoint upgrade test"
7070

71-
echo "Starting sessionjob last-state upgrade test"
72-
# Testing last-state mode upgrade
73-
# Update the FlinkSessionJob and trigger the last-state upgrade
74-
kubectl patch sessionjob ${SESSION_JOB_NAME} --type merge --patch '{"spec":{"job": {"parallelism": 2, "upgradeMode": "last-state" } } }'
71+
flink_version=$(kubectl get $SESSION_CLUSTER_IDENTIFIER -o yaml | yq '.spec.flinkVersion')
7572

76-
# Check the job was restarted with the new parallelism
77-
wait_for_status $SESSION_JOB_IDENTIFIER '.status.jobStatus.state' CANCELLING ${TIMEOUT} || exit 1
78-
wait_for_status $SESSION_JOB_IDENTIFIER '.status.jobStatus.state' RUNNING ${TIMEOUT} || exit 1
79-
assert_available_slots 0 $CLUSTER_ID
73+
if [ "$flink_version" != "v1_16" ]; then
74+
echo "Starting sessionjob last-state upgrade test"
75+
# Testing last-state mode upgrade
76+
# Update the FlinkSessionJob and trigger the last-state upgrade
77+
kubectl patch sessionjob ${SESSION_JOB_NAME} --type merge --patch '{"spec":{"job": {"parallelism": 2, "upgradeMode": "last-state" } } }'
8078

81-
echo "Successfully run the sessionjob last-state upgrade test"
79+
# Check the job was restarted with the new parallelism
80+
wait_for_status $SESSION_JOB_IDENTIFIER '.status.jobStatus.state' CANCELLING ${TIMEOUT} || exit 1
81+
wait_for_status $SESSION_JOB_IDENTIFIER '.status.jobStatus.state' RUNNING ${TIMEOUT} || exit 1
82+
assert_available_slots 0 $CLUSTER_ID
83+
84+
echo "Successfully run the sessionjob last-state upgrade test"
85+
else
86+
echo "Skipping last-state test for flink version 1.16"
87+
fi
8288

8389
# Test Operator restart
8490
echo "Delete session job " + $SESSION_JOB_NAME

0 commit comments

Comments
 (0)