This is an automated email from the ASF dual-hosted git repository.

wangyang0918 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new b296738  [FLINK-23418][e2e] Increase the timeout to make kubernetes 
application ha test more stable
b296738 is described below

commit b296738c7add3309a0c04f5956368a3e52d470df
Author: wangyang0918 <[email protected]>
AuthorDate: Fri Jul 23 11:28:44 2021 +0800

    [FLINK-23418][e2e] Increase the timeout to make kubernetes application ha 
test more stable
    
    This closes #16602.
---
 flink-end-to-end-tests/test-scripts/common_kubernetes.sh       | 10 +++++-----
 .../test-scripts/test_kubernetes_application_ha.sh             |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/flink-end-to-end-tests/test-scripts/common_kubernetes.sh 
b/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
index e4fa575..499aec6 100755
--- a/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
+++ b/flink-end-to-end-tests/test-scripts/common_kubernetes.sh
@@ -171,14 +171,14 @@ function wait_num_checkpoints {
 function wait_for_logs {
   local jm_pod_name=$1
   local successful_response_regex=$2
+  local timeout=${3:-30}
 
   echo "Waiting for jobmanager pod ${jm_pod_name} ready."
-  kubectl wait --for=condition=Ready --timeout=30s pod/$jm_pod_name || exit 1
+  kubectl wait --for=condition=Ready --timeout=${timeout}s pod/$jm_pod_name || 
exit 1
 
-  # wait at most 30 seconds until the log shows up
-  local TIMEOUT=30
+  # wait or timeout until the log shows up
   echo "Waiting for log \"$2\"..."
-  for i in $(seq 1 ${TIMEOUT}); do
+  for i in $(seq 1 ${timeout}); do
     if check_logs_output $jm_pod_name $successful_response_regex; then
       echo "Log \"$2\" shows up."
       return
@@ -186,7 +186,7 @@ function wait_for_logs {
 
     sleep 1
   done
-  echo "Log $2 does not show up within a timeout of ${TIMEOUT} sec"
+  echo "Log $2 does not show up within a timeout of ${timeout} sec"
   exit 1
 }
 
diff --git 
a/flink-end-to-end-tests/test-scripts/test_kubernetes_application_ha.sh 
b/flink-end-to-end-tests/test-scripts/test_kubernetes_application_ha.sh
index 0d8541e..c38d6bd 100755
--- a/flink-end-to-end-tests/test-scripts/test_kubernetes_application_ha.sh
+++ b/flink-end-to-end-tests/test-scripts/test_kubernetes_application_ha.sh
@@ -74,7 +74,7 @@ job_id=$(kubectl logs $jm_pod_name | grep -E -o 'Job 
[a-z0-9]+ is submitted' | a
 kubectl exec $jm_pod_name -- /bin/sh -c "kill 1"
 
 # Check the new JobManager recovering from latest successful checkpoint
-wait_for_logs $jm_pod_name "Restoring job $job_id from Checkpoint"
+wait_for_logs $jm_pod_name "Restoring job $job_id from Checkpoint" 120
 wait_num_checkpoints $jm_pod_name 1
 
 "$FLINK_DIR"/bin/flink cancel -t kubernetes-application 
-Dkubernetes.cluster-id=${CLUSTER_ID} $job_id

Reply via email to