Skip to content

Commit

Permalink
[hotfix][test-scripts] Properly wait for cluster to be up in common.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed May 16, 2018
1 parent 63740e7 commit cddb65a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flink-end-to-end-tests/test-scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:https://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
Expand Down

0 comments on commit cddb65a

Please sign in to comment.