-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-27160] Add e2e tests for session job #179
Conversation
FYI, I found that the test can not completely run on the Mac now. Because the minikube ip can not be reached from the local machine. |
The result of |
I use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comments.
e2e-tests/test_last_state_upgrade.sh
Outdated
@@ -47,6 +48,7 @@ function wait_for_jobmanager_running() { | |||
function assert_available_slots() { | |||
expected=$1 | |||
ip=$(minikube ip) | |||
curl http://$ip/default/${CLUSTER_ID}/overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
e2e-tests/test_sessionjob_ha.sh
Outdated
retry_times 30 3 "kubectl get deploy/${CLUSTER_ID}" || exit 1 | ||
|
||
kubectl wait --for=condition=Available --timeout=${TIMEOUT}s deploy/${CLUSTER_ID} || exit 1 | ||
jm_pod_name=$(kubectl get pods --selector="app=${CLUSTER_ID},component=jobmanager" -o jsonpath='{..metadata.name}') | ||
|
||
echo "Waiting for jobmanager pod ${jm_pod_name} ready." | ||
kubectl wait --for=condition=Ready --timeout=${TIMEOUT}s pod/$jm_pod_name || exit 1 | ||
|
||
wait_for_logs $jm_pod_name "Rest endpoint listening at" ${TIMEOUT} || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be deduplicated by having wait_for_jobmanager_running
in utils.sh
.
e2e-tests/test_sessionjob_ha.sh
Outdated
SESSION_CLUSTER_IDENTIFIER="flinkdep/session-cluster-1" | ||
SESSION_JOB_IDENTIFIER="sessionjob/flink-example-statemachine" | ||
|
||
function cleanup_and_exit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be extracted to util.sh
.
wait_for_logs $jm_pod_name "Rest endpoint listening at" ${TIMEOUT} || exit 1 | ||
} | ||
|
||
function assert_available_slots() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be extracted to util.sh
and deduplicated.
I have addressed your comments, please take a look again @wangyang0918 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for merging.
d22ebba
to
fb13a14
Compare
This PR is meant to add the e2e test for the session job. It mostly aligned to the flinkdep tests.