From 40f99249e664ba3f877c8fa2643a39e2c61b24ce Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Mon, 6 Jul 2020 16:45:37 -0400 Subject: [PATCH] Clear `JAVA_HOME` to use bundled JDK for Elasticsearch This commit clears the `JAVA_HOME` variable when starting Elasticsearch to force it to use the bundled version of the JDK, rather than the default `JAVA_HOME` from the machine Logstash integration tests are being run on, and removes the likelihood of tests failing to run due to `JAVA_HOME` being set to a non-compliant JDK. --- qa/integration/services/elasticsearch_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/integration/services/elasticsearch_setup.sh b/qa/integration/services/elasticsearch_setup.sh index c5cebcf1e..0af88f0d9 100755 --- a/qa/integration/services/elasticsearch_setup.sh +++ b/qa/integration/services/elasticsearch_setup.sh @@ -8,7 +8,7 @@ ES_HOME="$current_dir/../../../build/elasticsearch" start_es() { es_args=$@ - $ES_HOME/bin/elasticsearch -Epath.data=/tmp/ls_integration/es-data -Epath.logs=/tmp/ls_integration/es-logs $es_args -p $ES_HOME/elasticsearch.pid > /tmp/elasticsearch.log 2>/dev/null & + JAVA_HOME= $ES_HOME/bin/elasticsearch -Epath.data=/tmp/ls_integration/es-data -Epath.logs=/tmp/ls_integration/es-logs $es_args -p $ES_HOME/elasticsearch.pid > /tmp/elasticsearch.log 2>/dev/null & count=120 echo "Waiting for elasticsearch to respond..." while ! curl --silent localhost:9200 && [[ $count -ne 0 ]]; do