asfgit closed pull request #7057: [FLINK-10361][tests][ES] Properly wait for ES
to start
URL: https://github.com/apache/flink/pull/7057
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
b/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
index 16689c8a3f8..8bb9c42ab69 100644
--- a/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
+++ b/flink-end-to-end-tests/test-scripts/elasticsearch-common.sh
@@ -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://localhost:9200' || true
+ output=$(curl -XGET 'http://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."
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services