diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java index 4001fb982ba..0847ff63fd1 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java @@ -539,6 +539,8 @@ public class TestIndexWriterOnDiskFull extends LuceneTestCase { MockDirectoryWrapper dir = newMockDirectory(); // IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(new // MockAnalyzer(random)).setReaderPooling(true)); + LogDocMergePolicy mp = new LogDocMergePolicy(); + mp.setMergeFactor(2); IndexWriter w = new IndexWriter( dir, @@ -546,7 +548,7 @@ public class TestIndexWriterOnDiskFull extends LuceneTestCase { .setMergeScheduler(new SerialMergeScheduler()) .setReaderPooling(true) .setMergePolicy( - new FilterMergePolicy(newLogMergePolicy(2)) { + new FilterMergePolicy(mp) { @Override public boolean keepFullyDeletedSegment( IOSupplier readerIOSupplier) throws IOException {