Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-17631: Fixing TestSnapshotCoreBackup, as checksum levels changed in Lucene 10

Ishan Chattopadhyaya6fa6f3c61596
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 95afeb9db1d..74bae5f42c1 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
@@ -452,7 +452,8 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
Files.exists(backup.resolve(expectedSegmentsFileName)));
}
try (Directory dir = FSDirectory.open(backup)) {
- TestUtil.checkIndex(dir, 0, true, true, null);
+ // Lucene 10 changed CheckIndex levels from 0-3 to 1-3, so we use 1 (minimum level)
+ TestUtil.checkIndex(dir, 1, true, true, null);
try (DirectoryReader r = DirectoryReader.open(dir)) {
assertEquals("numDocs in " + backup, numDocs, r.numDocs());
if (null != expectedSegmentsFileName) {