Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix flakey TestDocTermOrds tests

Houston Putmana080cf96ddb2
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
index 21aa4f1576c..573d2e5dd19 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
@@ -494,7 +494,9 @@ public class TestDocTermOrds extends SolrTestCase {
public void testNumericEncoded32() throws IOException {
Directory dir = newDirectory();
- IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null));
+ IndexWriterConfig iwconfig = newIndexWriterConfig(null);
+ iwconfig.setMergePolicy(newLogMergePolicy());
+ IndexWriter iw = new IndexWriter(dir, iwconfig);
Document doc = new Document();
doc.add(new LegacyIntField("foo", 5, Field.Store.NO));
@@ -536,7 +538,9 @@ public class TestDocTermOrds extends SolrTestCase {
public void testNumericEncoded64() throws IOException {
Directory dir = newDirectory();
- IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null));
+ IndexWriterConfig iwconfig = newIndexWriterConfig(null);
+ iwconfig.setMergePolicy(newLogMergePolicy());
+ IndexWriter iw = new IndexWriter(dir, iwconfig);
Document doc = new Document();
doc.add(new LegacyLongField("foo", 5, Field.Store.NO));