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:26:18 UTC
[lucene] branch branch_9x 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 branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 1998903 LUCENE-10291: Don't use CFS in testMinimalCodec (#593)
1998903 is described below
commit 1998903a4583cd18597f54cc83354b99a032e99b
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);
}