Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16432: Fix hdfs tests to allow illegal access to start HDFS cluster

Kevin Risden6a415aa7818d
diff --git a/gradle/testing/defaults-tests.gradle b/gradle/testing/defaults-tests.gradle
index 32044d9a36b..8dfaf4e0c64 100644
--- a/gradle/testing/defaults-tests.gradle
+++ b/gradle/testing/defaults-tests.gradle
@@ -91,7 +91,7 @@ allprojects {
tasks.withType(Test) {
ext {
- testOutputsDir = file("${reports.junitXml.outputLocation}/outputs")
+ testOutputsDir = file("${reports.junitXml.destination}/outputs")
}
// LUCENE-9660: Make it possible to always rerun tests, even if they're incrementally up-to-date.
diff --git a/solr/modules/hdfs/build.gradle b/solr/modules/hdfs/build.gradle
index 8431c81b07e..8bc28f4975f 100644
--- a/solr/modules/hdfs/build.gradle
+++ b/solr/modules/hdfs/build.gradle
@@ -87,3 +87,10 @@ task copySolrCoreTestResources(type: Copy) {
tasks.processTestResources.configure {
dependsOn copySolrCoreTestResources
}
+
+// Hadoop mini cluster doesn't handle reflection properly in JDK 16+
+// https://docs.gradle.org/current/userguide/upgrading_version_7.html#removes_implicit_add_opens_for_test_workers
+tasks.withType(Test).configureEach {
+ jvmArgs(["--add-opens=java.base/java.lang=ALL-UNNAMED",
+ "--add-opens=java.base/java.util=ALL-UNNAMED"])
+}