mirror of https://github.com/apache/lucene.git
LUCENE-8998: Fix OverviewImplTest.testIsOptimized reproducible failure
This commit is contained in:
parent
22e96697de
commit
42ff080c84
|
@ -187,6 +187,8 @@ Other
|
|||
* LUCENE-8993, LUCENE-8807: Changed all repository and download references in build files
|
||||
to HTTPS. (Uwe Schindler)
|
||||
|
||||
* LUCENE-8998: Fix OverviewImplTest.testIsOptimized reproducible failure. (Tomoko Uchida)
|
||||
|
||||
======================= Lucene 8.2.0 =======================
|
||||
|
||||
API Changes
|
||||
|
|
|
@ -28,6 +28,8 @@ import org.apache.lucene.document.Field;
|
|||
import org.apache.lucene.document.TextField;
|
||||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.NoMergePolicy;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
|
@ -55,7 +57,9 @@ public abstract class OverviewTestBase extends LuceneTestCase {
|
|||
Path indexDir = createTempDir();
|
||||
|
||||
Directory dir = newFSDirectory(indexDir);
|
||||
RandomIndexWriter writer = new RandomIndexWriter(random(), dir, new MockAnalyzer(random()));
|
||||
IndexWriterConfig config = new IndexWriterConfig(new MockAnalyzer(random()));
|
||||
config.setMergePolicy(NoMergePolicy.INSTANCE); // see LUCENE-8998
|
||||
RandomIndexWriter writer = new RandomIndexWriter(random(), dir, config);
|
||||
|
||||
Document doc1 = new Document();
|
||||
doc1.add(newStringField("f1", "1", Field.Store.NO));
|
||||
|
|
Loading…
Reference in New Issue