This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9_8
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_8 by this push:
new 4c3faabd87b Fix flakey TestDocTermOrds tests
4c3faabd87b is described below
commit 4c3faabd87bc4321108e13685e2a00b6353a1a1b
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.
(cherry picked from commit a080cf96ddb2969ca37f723bcbbb0658d53e0fb4)
---
.../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));