Apache Solr open-source search software
Correct lucene version passed to tests to be stripped of qualifiers.
Dawid Weiss226f5490a05c
diff --git a/gradle/testing/randomization.gradle b/gradle/testing/randomization.gradleindex 6042676e081..b97ad7f9b01 100644--- a/gradle/testing/randomization.gradle+++ b/gradle/testing/randomization.gradle@@ -22,6 +22,15 @@ configure(rootProject) {rootSeed = propertyOrDefault('tests.seed', String.format("%08X", new Random().nextLong()))rootSeedLong = SeedUtils.parseSeedChain(rootSeed)[0]projectSeedLong = rootSeedLong ^ project.path.hashCode()++ // "base" version is stripped of the qualifier. Compute it.+ baseVersion = {+ def m = (rootProject.version =~ /^(\d+\.\d+\.\d+)(-(.+))?/)+ if (!m) {+ throw GradleException("Can't strip version to just x.y.z: " + rootProject.version)+ }+ return m[0][1]+ }()}task randomizationInfo() {@@ -72,7 +81,7 @@ allprojects {// test data[propName: 'tests.linedocsfile', value: 'europarl.lines.txt.gz', description: "Test data file path."],// miscellaneous; some of them very weird.- [propName: 'tests.LUCENE_VERSION', value: rootProject.version, description: "Base Lucene version."],+ [propName: 'tests.LUCENE_VERSION', value: baseVersion, description: "Base Lucene version."],[propName: 'tests.bwcdir', value: null, description: "Data for backward-compatibility indexes."],]}@@ -85,7 +94,7 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr") }) {ext {testOptions += [[propName: 'tests.disableHdfs', value: Os.isFamily(Os.FAMILY_WINDOWS) ? 'true' : 'false', description: "Enables or disables @HDFS tests."],- [propName: 'tests.luceneMatchVersion', value: rootProject.version, description: "Base Lucene version."],+ [propName: 'tests.luceneMatchVersion', value: baseVersion, description: "Base Lucene version."],[propName: 'common-solr.dir', value: file("${commonDir}/../solr").path, description: "Solr base dir."],[propName: 'solr.directoryFactory', value: "org.apache.solr.core.MockDirectoryFactory", description: "Solr directory factory."],[propName: 'tests.src.home', value: null, description: "See SOLR-14023."],diff --git a/solr/solrj/build.gradle b/solr/solrj/build.gradleindex 69ff4e750ac..e9025a5d37b 100644--- a/solr/solrj/build.gradle+++ b/solr/solrj/build.gradle@@ -36,11 +36,8 @@ dependencies {exclude group: "org.slf4j", module: "slf4j-log4j12"})- api('com.fasterxml:aalto-xml', {- })-- api('com.fasterxml.staxmate:staxmate', {- })+ api('com.fasterxml:aalto-xml')+ api('com.fasterxml.staxmate:staxmate')testImplementation project(':solr:test-framework')testImplementation 'org.eclipse.jetty:jetty-webapp'