LUCENE-7410: Fix test bug.

This commit is contained in:
Adrien Grand 2017-03-03 17:39:48 +01:00
parent d947f53ef0
commit fbc844d334
1 changed files with 2 additions and 1 deletions

View File

@ -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")));