You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2020/08/14 10:15:24 UTC
[lucene-solr] branch branch_8x updated: Fix TestForTooMuchCloning
to ensure it's MP is not reconfigured randomly
This is an automated email from the ASF dual-hosted git repository.
simonw pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new cda6a88 Fix TestForTooMuchCloning to ensure it's MP is not reconfigured randomly
cda6a88 is described below
commit cda6a8805c1048690a651cc68ce8de868e2e7525
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Fri Aug 14 12:14:31 2020 +0200
Fix TestForTooMuchCloning to ensure it's MP is not reconfigured randomly
---
.../core/src/test/org/apache/lucene/index/TestForTooMuchCloning.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestForTooMuchCloning.java b/lucene/core/src/test/org/apache/lucene/index/TestForTooMuchCloning.java
index 6be8e78..e7e6624 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestForTooMuchCloning.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestForTooMuchCloning.java
@@ -40,7 +40,9 @@ public class TestForTooMuchCloning extends LuceneTestCase {
final RandomIndexWriter w = new RandomIndexWriter(random(), dir,
newIndexWriterConfig(new MockAnalyzer(random()))
.setMaxBufferedDocs(2)
- .setMergePolicy(tmp));
+ // use a FilterMP otherwise RIW will randomly reconfigure
+ // the MP while the test runs
+ .setMergePolicy(new FilterMergePolicy(tmp)));
final int numDocs = 20;
for(int docs=0;docs<numDocs;docs++) {
StringBuilder sb = new StringBuilder();
@@ -54,7 +56,6 @@ public class TestForTooMuchCloning extends LuceneTestCase {
}
final IndexReader r = w.getReader();
w.close();
-
//System.out.println("merge clone count=" + cloneCount);
assertTrue("too many calls to IndexInput.clone during merging: " + dir.getInputCloneCount(), dir.getInputCloneCount() < 500);