Apache Lucene open-source search software
LUCENE-5190: Fix failure of TestCheckIndex.testLuceneConstantVersion in Jenkins trunk clover build and other builds using -Ddev.version.suffix
Uwe Schindlerd58e179f627a
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java b/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.javaindex cd33794142d..66542ab0b49 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java@@ -117,8 +117,10 @@ public class TestCheckIndex extends LuceneTestCase {public void testLuceneConstantVersion() throws IOException {// common-build.xml sets lucene.version- final String version = System.getProperty("lucene.version");+ String version = System.getProperty("lucene.version");assertNotNull( "null version", version);+ // remove anything after a "-" from the version string:+ version = version.replaceAll("-.*$", "");final String constantVersion;String parts[] = Constants.LUCENE_MAIN_VERSION.split("\\.");if (parts.length == 4) {@@ -130,7 +132,6 @@ public class TestCheckIndex extends LuceneTestCase {constantVersion = Constants.LUCENE_MAIN_VERSION;}assertTrue("Invalid version: "+version,- version.equals(constantVersion+"-SNAPSHOT") ||version.equals(constantVersion));assertTrue(Constants.LUCENE_VERSION + " should start with: "+version,Constants.LUCENE_VERSION.startsWith(version));