This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new a080cf96ddb Fix flakey TestDocTermOrds tests
a080cf96ddb is described below
commit a080cf96ddb2969ca37f723bcbbb0658d53e0fb4
Author: Houston Putman <[email protected]>
AuthorDate: Mon Feb 10 14:32:33 2025 -0600
Fix flakey TestDocTermOrds tests
testNumericEncoded32() and testNumericEncoded64() were flakey,
because the default TieredMergePolicy did not respect original docId
ordinals. This meant that what the test thought was docID=0, could be
re-ordered during a merge.
---
.../src/test/org/apache/solr/uninverting/TestDocTermOrds.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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));