CASSANDRA-21115 follow-up: fix checkstyle-test unused-import failure#70
Merged
Conversation
Fixes checkstyle-test failure:
[ERROR] test/unit/.../AutoRepairTest.java:43:8:
Unused import - org.apache.cassandra.service.AutoRepairService. [UnusedImports]
Import was inadvertently pulled in during the CASSANDRA-21115 cherry-pick
conflict resolution (union of imports). It is used only on trunk (5.1),
where the @before setup() calls AutoRepairService.setup(); this branch does
not have that call.
Verified locally: `ant checkstyle checkstyle-test` clean; AutoRepairTest
still 9/9 passing.
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #69 (merged as
ebc10e9). The merged commit series introduced an unused import oforg.apache.cassandra.service.AutoRepairServiceinAutoRepairTest.java, which failscheckstyle-test:The import was pulled in during the cherry-pick conflict resolution (union of imports from trunk). It is used only on trunk (5.1), where
@Before setup()callsAutoRepairService.setup();. This branch does not have that call, so the import is dead code.The fix in #69 (
8ba7e12609) was pushed 29 minutes after Jaydeep merged the PR atebc10e9, so it did not get carried along. This PR re-lands just that one-line deletion on top of the currentauto_repair_v2_on_4_1tip.Change
import org.apache.cassandra.service.AutoRepairService;fromtest/unit/org/apache/cassandra/repair/autorepair/AutoRepairTest.java.Test plan
Locally on JDK 11 (Amazon Corretto 11.0.30,
CASSANDRA_USE_JDK11=true):ant realclean && ant build— BUILD SUCCESSFUL (checkstyle clean)ant build-test— BUILD SUCCESSFUL (checkstyle-test clean; without this fix it fails onAutoRepairTest.java:43)ant testsome -Dtest.name=org.apache.cassandra.repair.autorepair.AutoRepairTest— 9/9 passingAutoRepairStateTest(72/72),AutoRepairUtilsTest(33/33),AutoRepairParameterizedTest(90/90) — all passVerified on JDK 8 (Amazon Corretto 8.492) as well: main build + test compile + checkstyle-test all clean;