Skip to content

Commit fcde4d7

Browse files
committed
[e2e] Test against session job exception fetching error
1 parent da8745f commit fcde4d7

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

e2e-tests/test_application_operations.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jm_pod_name=$(get_jm_pod_name $CLUSTER_ID)
6363
# Check the new JobManager recovering from latest successful checkpoint
6464
wait_for_logs $jm_pod_name "Restoring job $job_id from Checkpoint" ${TIMEOUT} || exit 1
6565
wait_for_logs $jm_pod_name "Completed checkpoint [0-9]+ for job" ${TIMEOUT} || exit 1
66+
verify_not_in_operator_log $jm_pod_name "Failed to fetch job exceptions" ${TIMEOUT} || exit 1
6667
wait_for_status flinkdep/flink-example-statemachine '.status.jobManagerDeploymentStatus' READY ${TIMEOUT} || exit 1
6768
wait_for_status flinkdep/flink-example-statemachine '.status.jobStatus.state' RUNNING ${TIMEOUT} || exit 1
6869
assert_available_slots 1 $CLUSTER_ID

e2e-tests/test_sessionjob_operations.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,6 @@ retry_times 5 30 "kubectl apply -f $APPLICATION_YAML" || exit 1
9696

9797
wait_for_jobmanager_running $CLUSTER_ID $TIMEOUT
9898
wait_for_logs $jm_pod_name "Completed checkpoint [0-9]+ for job" ${TIMEOUT} || exit 1
99+
verify_not_in_operator_log $jm_pod_name "Failed to fetch job exceptions" ${TIMEOUT} || exit 1
99100
wait_for_status $SESSION_CLUSTER_IDENTIFIER '.status.jobManagerDeploymentStatus' READY ${TIMEOUT} || exit 1
100101
wait_for_status $SESSION_JOB_IDENTIFIER '.status.jobStatus.state' RUNNING ${TIMEOUT} || exit 1

e2e-tests/utils.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ function wait_for_operator_logs {
5656
exit 1
5757
}
5858

59+
function verify_not_in_operator_log {
60+
local operator_pod_name=$1
61+
local regex_to_check=$2
62+
local timeout=$3
63+
operator_pod_namespace=$(get_operator_pod_namespace)
64+
65+
if kubectl logs "${operator_pod_name}" -c flink-kubernetes-operator -n "${operator_pod_namespace}" | grep -E "${regex_to_check}" >/dev/null; then
66+
echo "Found \"$2\" in operator logs."
67+
return 1
68+
fi
69+
return 0
70+
}
71+
5972
function wait_for_status {
6073
local resource=$1
6174
local status_path=$2

0 commit comments

Comments
 (0)