You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/10/30 22:19:00 UTC

[solr] 01/02: SOLR-16511: Fix key in AbstractIncrementalBackupTest.corruptIndexFiles

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit bb7f40bd360587ae51b041730c7877e36a62c299
Author: Kevin Risden <kr...@apache.org>
AuthorDate: Sun Oct 30 14:57:29 2022 -0400

    SOLR-16511: Fix key in AbstractIncrementalBackupTest.corruptIndexFiles
---
 .../solr/cloud/api/collections/AbstractIncrementalBackupTest.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
index c719d4988bf..9af8553dd5c 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
@@ -366,7 +366,7 @@ public abstract class AbstractIncrementalBackupTest extends SolrCloudTestCase {
     try (FileInputStream fis = new FileInputStream(fileGetCorrupted)) {
       byte[] contents = fis.readAllBytes();
       for (int i = 1; i < 5; i++) {
-        byte key = (byte) (contents.length - CodecUtil.footerLength() - i);
+        int key = contents.length - CodecUtil.footerLength() - i;
         contents[key] = (byte) (contents[key] + 1);
       }
       try (FileOutputStream fos = new FileOutputStream(fileGetCorrupted)) {