From fbc844d33439efc1c5c6fee5547715d1a1b0db83 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Fri, 3 Mar 2017 17:39:48 +0100 Subject: [PATCH] LUCENE-7410: Fix test bug. --- .../org/apache/solr/index/TestSlowCompositeReaderWrapper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java index 195aae5a199..9907d59eafa 100644 --- a/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java +++ b/solr/core/src/test/org/apache/solr/index/TestSlowCompositeReaderWrapper.java @@ -30,6 +30,7 @@ import org.apache.lucene.index.LeafReader; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.MultiDocValues.MultiSortedDocValues; import org.apache.lucene.index.MultiDocValues.MultiSortedSetDocValues; +import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LuceneTestCase; @@ -95,7 +96,7 @@ public class TestSlowCompositeReaderWrapper extends LuceneTestCase { public void testOrdMapsAreCached() throws Exception { Directory dir = newDirectory(); - RandomIndexWriter w = new RandomIndexWriter(random(), dir); + RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig().setMergePolicy(NoMergePolicy.INSTANCE)); Document doc = new Document(); doc.add(new SortedDocValuesField("sorted", new BytesRef("a"))); doc.add(new SortedSetDocValuesField("sorted_set", new BytesRef("b")));