You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2018/05/16 14:41:10 UTC

[2/2] flink git commit: [hotfix][test-scripts] Properly wait for cluster to be up in common.sh

[hotfix][test-scripts] Properly wait for cluster to be up in common.sh


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7fb94fb3
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7fb94fb3
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7fb94fb3

Branch: refs/heads/release-1.5
Commit: 7fb94fb345fd6a8d414162e61a000ac8101d81b5
Parents: 0181131
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Wed May 16 16:39:15 2018 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Wed May 16 16:40:36 2018 +0200

----------------------------------------------------------------------
 flink-end-to-end-tests/test-scripts/common.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/7fb94fb3/flink-end-to-end-tests/test-scripts/common.sh
----------------------------------------------------------------------
diff --git a/flink-end-to-end-tests/test-scripts/common.sh b/flink-end-to-end-tests/test-scripts/common.sh
index b4e38a2..b2a09d0 100644
--- a/flink-end-to-end-tests/test-scripts/common.sh
+++ b/flink-end-to-end-tests/test-scripts/common.sh
@@ -157,9 +157,9 @@ function start_cluster {
     # without the || true this would exit our script if the JobManager is not yet up
     QUERY_RESULT=$(curl "http://localhost:8081/taskmanagers" 2> /dev/null || true)
 
-    if [[ "$QUERY_RESULT" == "" ]]; then
-      echo "Dispatcher/TaskManagers are not yet up"
-    elif [[ "$QUERY_RESULT" != "{\"taskmanagers\":[]}" ]]; then
+    # ensure the taskmanagers field is there at all and is not empty
+    if [[ ${QUERY_RESULT} =~ \{\"taskmanagers\":\[.+\]\} ]]; then
+
       echo "Dispatcher REST endpoint is up."
       break
     fi