From 663655d6590223573fbc816aa19e9c256fb8d937 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 1 Dec 2020 10:21:29 +0100 Subject: [PATCH] SOLR-15013: Prevent merges since test asserts doc order --- .../test/org/apache/solr/uninverting/TestFieldCacheSort.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java index f7d7960b4bf..9cd853e8cb5 100644 --- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java +++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java @@ -35,6 +35,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.index.MultiReader; +import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.Term; import org.apache.solr.legacy.LegacyDoubleField; @@ -1590,7 +1591,7 @@ public class TestFieldCacheSort extends SolrTestCase { public void testEmptyStringVsNullStringSort() throws Exception { Directory dir = newDirectory(); - IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random()))); + IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random())).setMergePolicy(NoMergePolicy.INSTANCE)); Document doc = new Document(); doc.add(newStringField("f", "", Field.Store.NO)); doc.add(newStringField("t", "1", Field.Store.NO));