You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2022/01/10 12:17:50 UTC
[lucene] branch main updated: LUCENE-10291: Don't use CFS in testMinimalCodec (#593)
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new d9d65ab LUCENE-10291: Don't use CFS in testMinimalCodec (#593)
d9d65ab is described below
commit d9d65ab84986e3e269727c786a4258367db7f61e
Author: Yannick Welsch <ya...@welsch.lu>
AuthorDate: Mon Jan 10 13:17:45 2022 +0100
LUCENE-10291: Don't use CFS in testMinimalCodec (#593)
This test was occasionally failing on CI, as the test randomly installed a merge policy
that would force compound file creation while the goal of the test was not to do so.
---
lucene/core/src/test/org/apache/lucene/codecs/TestMinimalCodec.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/TestMinimalCodec.java b/lucene/core/src/test/org/apache/lucene/codecs/TestMinimalCodec.java
index c3c4edb..adeb5bd 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/TestMinimalCodec.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/TestMinimalCodec.java
@@ -49,6 +49,8 @@ public class TestMinimalCodec extends LuceneTestCase {
.setCodec(useCompoundFile ? new MinimalCompoundCodec() : new MinimalCodec())
.setUseCompoundFile(useCompoundFile);
if (!useCompoundFile) {
+ // Avoid using MockMP as it randomly enables compound file creation
+ writerConfig.setMergePolicy(newMergePolicy(random(), false));
writerConfig.getMergePolicy().setNoCFSRatio(0.0);
writerConfig.getMergePolicy().setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY);
}