This is an automated email from the ASF dual-hosted git repository.
cpoerschke 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 d9741772244 SOLR-17631: fix TestStressThreadBackup w.r.t.
CheckIndex.Level (#3495)
d9741772244 is described below
commit d974177224454006db03cd3c4f5e63ea8f1b86e4
Author: Christine Poerschke <[email protected]>
AuthorDate: Wed Aug 27 17:36:07 2025 +0100
SOLR-17631: fix TestStressThreadBackup w.r.t. CheckIndex.Level (#3495)
* fix TestStressThreadBackup w.r.t. CheckIndex.Level
* use CheckIndex.Level in TestSnapshotCoreBackup
---
solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java | 3 ++-
solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
index 74bae5f42c1..126d39f0f83 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
+import org.apache.lucene.index.CheckIndex;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexCommit;
import org.apache.lucene.store.Directory;
@@ -453,7 +454,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
}
try (Directory dir = FSDirectory.open(backup)) {
// Lucene 10 changed CheckIndex levels from 0-3 to 1-3, so we use 1
(minimum level)
- TestUtil.checkIndex(dir, 1, true, true, null);
+ TestUtil.checkIndex(dir, CheckIndex.Level.MIN_VALUE, true, true, null);
try (DirectoryReader r = DirectoryReader.open(dir)) {
assertEquals("numDocs in " + backup, numDocs, r.numDocs());
if (null != expectedSegmentsFileName) {
diff --git
a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
index 0b0e3b535c2..838afd394ad 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
@@ -31,6 +31,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import org.apache.lucene.index.CheckIndex;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.store.Directory;
@@ -334,7 +335,7 @@ public class TestStressThreadBackup extends
SolrCloudTestCase {
final int numRealDocsExpected = Integer.parseInt(m.group());
try (Directory dir = FSDirectory.open(backup)) {
- TestUtil.checkIndex(dir, 0, true, true, null);
+ TestUtil.checkIndex(dir, CheckIndex.Level.MIN_LEVEL_FOR_SLOW_CHECKS,
true, true, null);
try (DirectoryReader r = DirectoryReader.open(dir)) {
assertEquals(
"num real docs in " + backup,