Skip to content

Commit

Permalink
[FLINK-10361][tests][ES] Properly wait for ES to start
Browse files Browse the repository at this point in the history
This closes apache#7057.
  • Loading branch information
zentol authored and twalthr committed Nov 8, 2018
1 parent c5e227b commit d946ec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ function wait_elasticsearch_working {
echo "Waiting for Elasticsearch node to work..."

for ((i=1;i<=60;i++)); do
curl -XGET 'http:https://localhost:9200' || true
output=$(curl -XGET 'http:https://localhost:9200' | grep "cluster_name" || true)

# make sure the elasticsearch node is actually working
if [ $? -ne 0 ]; then
if [ "${output}" = "" ]; then
sleep 1
else
echo "Elasticsearch node is working."
Expand Down

0 comments on commit d946ec5

Please sign in to comment.