diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index 5cc5cc18f8e..40885cd444d 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -561,7 +561,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase { Directory dir = newFSDirectory(outputDir); LogMergePolicy mergePolicy = newLogMergePolicy(true, 10); - mergePolicy.setNoCFSRatio(1); // This test expects all of its segments to be in CFS + + // This test expects all of its segments to be in CFS: + mergePolicy.setNoCFSRatio(1.0); + mergePolicy.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter writer = new IndexWriter( dir,