You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2020/12/01 09:24:53 UTC

[lucene-solr] branch branch_8x updated: SOLR-15013: Prevent merges since test asserts doc order

This is an automated email from the ASF dual-hosted git repository.

simonw pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new e0f789b  SOLR-15013: Prevent merges since test asserts doc order
e0f789b is described below

commit e0f789b7a6c05ad7e2af53f4ae1a2d29546e5519
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Tue Dec 1 10:21:29 2020 +0100

    SOLR-15013: Prevent merges since test asserts doc order
---
 solr/core/src/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 f7d7960..9cd853e 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));