Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

try again

Mike McCandlessc40308387240
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
index b4b6f7d26f9..c53293ccd65 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
@@ -195,6 +195,7 @@ abstract class BaseIndexFileFormatTestCase extends LuceneTestCase {
/** The purpose of this test is to make sure that bulk merge doesn't accumulate useless data over runs. */
public void testMergeStability() throws Exception {
+ assumeTrue("merge is not stable", mergeIsStable());
Directory dir = newDirectory();
if (dir instanceof MockDirectoryWrapper) {
// Else, the virus checker may prevent deletion of files and cause
@@ -240,6 +241,10 @@ abstract class BaseIndexFileFormatTestCase extends LuceneTestCase {
dir2.close();
}
+ protected boolean mergeIsStable() {
+ return true;
+ }
+
/** Test the accuracy of the ramBytesUsed estimations. */
@Slow
public void testRamBytesUsed() throws IOException {
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BasePointFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BasePointFormatTestCase.java
index 3b19530f432..2b88d7460f6 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BasePointFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BasePointFormatTestCase.java
@@ -919,4 +919,11 @@ public abstract class BasePointFormatTestCase extends BaseIndexFileFormatTestCas
//dir = FSDirectory.open(createTempDir());
return dir;
}
+
+ @Override
+ protected boolean mergeIsStable() {
+ // suppress this test from base class: merges for BKD trees are not stable because the tree created by merge will have a different
+ // structure than the tree created by adding points separately
+ return false;
+ }
}