You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by pn...@apache.org on 2019/06/05 08:03:08 UTC

[flink] 04/09: [hotfix][e2e] Refactor yarn kerberos test: use retry_times to start hadoop cluster

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

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

commit 422328843b5c98a7bfeeef89c22e05ecb9578e1c
Author: Aleksey Pak <al...@ververica.com>
AuthorDate: Fri May 31 10:09:07 2019 +0200

    [hotfix][e2e] Refactor yarn kerberos test: use retry_times to start hadoop cluster
---
 .../test-scripts/test_yarn_kerberos_docker.sh             | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh b/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
index d587990..03fde92 100755
--- a/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
+++ b/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
@@ -92,20 +92,7 @@ do
     sleep 2
 done
 
-CLUSTER_STARTED=1
-for (( i = 0; i < $CLUSTER_SETUP_RETRIES; i++ ))
-do
-    if start_hadoop_cluster; then
-       echo "Cluster started successfully."
-       CLUSTER_STARTED=0
-       break #continue test, cluster set up succeeded
-    fi
-
-    echo "ERROR: Could not start hadoop cluster. Retrying..."
-    docker-compose -f $END_TO_END_DIR/test-scripts/docker-hadoop-secure-cluster/docker-compose.yml down
-done
-
-if [[ ${CLUSTER_STARTED} -ne 0 ]]; then
+if ! retry_times $CLUSTER_SETUP_RETRIES 0 start_hadoop_cluster; then
     echo "ERROR: Could not start hadoop cluster. Aborting..."
     exit 1
 fi