You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2013/08/28 22:20:18 UTC
svn commit: r1518354 -
/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
Author: uschindler
Date: Wed Aug 28 20:20:18 2013
New Revision: 1518354
URL: http://svn.apache.org/r1518354
Log:
LUCENE-5190: Fix failure of TestCheckIndex.testLuceneConstantVersion in Jenkins trunk clover build and other builds using -Ddev.version.suffix
Modified:
lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java?rev=1518354&r1=1518353&r2=1518354&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCheckIndex.java Wed Aug 28 20:20:18 2013
@@ -117,8 +117,10 @@ public class TestCheckIndex extends Luce
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 Luce
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));