mirror of https://github.com/apache/lucene.git
LUCENE-8442: Avoid merge in testPendingDeleteDVGeneration
If a merge is triggered, it might reclaim the randomFile which we picked up but haven't opened yet, the test will fail with NoSuchFileException. This commit disables merges to avoid such scenarios.
This commit is contained in:
parent
208d59b5e3
commit
3898653195
|
@ -2664,6 +2664,7 @@ public class TestIndexWriter extends LuceneTestCase {
|
|||
Closeable closeable = () -> IOUtils.close(toClose)) {
|
||||
IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()))
|
||||
.setUseCompoundFile(false)
|
||||
.setMergePolicy(NoMergePolicy.INSTANCE) // avoid merging away the randomFile
|
||||
.setMaxBufferedDocs(2)
|
||||
.setRAMBufferSizeMB(-1);
|
||||
IndexWriter w = new IndexWriter(dir, iwc);
|
||||
|
@ -2702,6 +2703,7 @@ public class TestIndexWriter extends LuceneTestCase {
|
|||
w.rollback();
|
||||
iwc = new IndexWriterConfig(new MockAnalyzer(random()))
|
||||
.setUseCompoundFile(false)
|
||||
.setMergePolicy(NoMergePolicy.INSTANCE)
|
||||
.setMaxBufferedDocs(2)
|
||||
.setRAMBufferSizeMB(-1);
|
||||
w = new IndexWriter(dir, iwc);
|
||||
|
|
Loading…
Reference in New Issue