From bcd9711ab67339c106c14c407c9d52a181ab1e81 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Thu, 5 Nov 2020 11:58:15 +0100 Subject: [PATCH] LUCENE-9536: Address test failure. --- .../src/test/org/apache/lucene/index/TestOrdinalMap.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java b/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java index e7b2777778c..0ea365fc048 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java @@ -101,9 +101,10 @@ public class TestOrdinalMap extends LuceneTestCase { */ public void testOneSegmentWithAllValues() throws IOException { Directory dir = newDirectory(); - IndexWriterConfig cfg = new IndexWriterConfig(new MockAnalyzer(random())).setCodec( - TestUtil.alwaysDocValuesFormat(TestUtil.getDefaultDocValuesFormat())); - RandomIndexWriter iw = new RandomIndexWriter(random(), dir, cfg); + IndexWriterConfig cfg = new IndexWriterConfig(new MockAnalyzer(random())) + .setCodec(TestUtil.alwaysDocValuesFormat(TestUtil.getDefaultDocValuesFormat())) + .setMergePolicy(NoMergePolicy.INSTANCE); + IndexWriter iw = new IndexWriter(dir, cfg); int numTerms = 1000; for (int i = 0; i < numTerms; ++i) {