You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2026/02/27 12:27:19 UTC
(lucene) branch branch_10x updated: Ensure that index is actually there in LegacyBaseDocValuesFormatTestCase (#15767)
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new ed87f20a7ac Ensure that index is actually there in LegacyBaseDocValuesFormatTestCase (#15767)
ed87f20a7ac is described below
commit ed87f20a7ac6c778541690947bb4193207fc8b2f
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Fri Feb 27 12:19:53 2026 +0000
Ensure that index is actually there in LegacyBaseDocValuesFormatTestCase (#15767)
In rare cases, testSortedNumericsSingleValuedMissingVsStoredFields in
LegacyBaseDocValuesFormatTestCase can fail because the various random
parameters determining flush and commit rates line up badly, and we don't
actually write any data to the test index before trying to open it. This adds
an explicit commit() call so that we avoid spurious failures, in line with other
similar tests in this suite.
---
lucene/CHANGES.txt | 2 ++
.../apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java | 3 +++
2 files changed, 5 insertions(+)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 811daa94b92..d08c0dcebf0 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -59,6 +59,8 @@ Other
* GITHUB#15764: Added simpler TestTesselator test in support of fix GITHUB#15731. (Craig Taverner)
+* GITHUB#15767: Fix random test failures in LegacyBaseDocValuesFormatTestCase caused by missing commit. (Alan Woodward)
+
======================= Lucene 10.4.0 =======================
API Changes
diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java
index bb567e580ae..9e1ddae6299 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/index/LegacyBaseDocValuesFormatTestCase.java
@@ -1544,6 +1544,9 @@ public abstract class LegacyBaseDocValuesFormatTestCase extends BaseIndexFileFor
int id = random().nextInt(numDocs);
writer.deleteDocuments(new Term("id", Integer.toString(id)));
}
+
+ writer.commit();
+
try (DirectoryReader reader = maybeWrapWithMergingReader(DirectoryReader.open(dir))) {
TestUtil.checkReader(reader);
compareStoredFieldWithSortedNumericsDV(reader, "stored", "dv");