From 14f3273dd2d3cf5f4d00d7cec601caca00701d71 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Wed, 26 May 2021 14:39:36 -0700 Subject: [PATCH] Use RUNTIME_JAVA_HOME for test clusters (#73003) --- .../gradle/test/ClusterFormationTasks.groovy | 2 +- .../xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index bd0c9d3df4aed..5cada84d78009 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -700,8 +700,8 @@ class ClusterFormationTasks { esJavaOpts.add('-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000') } node.env['ES_JAVA_OPTS'] = esJavaOpts.join(" ") + node.env['JAVA_HOME'] = node.getJavaHome() - // project.logger.info("Starting node in ${node.clusterName} distribution: ${node.config.distribution}") } return start diff --git a/x-pack/plugin/sql/qa/single-node/src/test/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java b/x-pack/plugin/sql/qa/single-node/src/test/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java index f89f801d28203..804e2d736fcd4 100644 --- a/x-pack/plugin/sql/qa/single-node/src/test/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java +++ b/x-pack/plugin/sql/qa/single-node/src/test/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcDocCsvSpecIT.java @@ -30,9 +30,9 @@ * gets reflected in the dataset structure. * The doc tests while redundant, try to be expressive first and foremost and sometimes * the dataset isn't exactly convenient. - * + * * Also looking around for the tests across the test files isn't trivial. - * + * * That's not to say the two cannot be merged however that felt like too much of an effort * at this stage and, to not keep things stalling, started with this approach. */ @@ -69,7 +69,7 @@ protected void assertResults(ResultSet expected, ResultSet elastic) throws SQLEx // uncomment this to printout the result set and create new CSV tests // //JdbcTestUtils.logLikeCLI(elastic, log); - JdbcAssert.assertResultSets(expected, elastic, log, true, false); + JdbcAssert.assertResultSets(expected, elastic, log, true, true); } @Override @@ -87,4 +87,4 @@ protected final void doTest() throws Throwable { assertResults(expected, elasticResults); } } -} \ No newline at end of file +}