KAFKA-20553: Eliminate the dependencies on "sourceSets.test.output" (raft)#22274
Merged
Merged
Conversation
b4022b5 to
64a892b
Compare
…raft Ref: https://issues.apache.org/jira/browse/KAFKA-20553 Similar to apache#22229 (server-common) and apache#22244 (storage:storage-api) but for the raft module. - Apply `java-test-fixtures` plugin to `:raft` - Move test helper classes (MockLog, RaftClientTestContext, MockNetworkChannel, etc.) from `src/test/` to `src/testFixtures/` - Introduce `VoterSetTestUtil` in testFixtures to hold the static helpers previously in `VoterSetTest`. This is necessary because `MockNetworkChannel` (now in testFixtures) referenced `VoterSetTest.DEFAULT_LISTENER_NAME`, but testFixtures cannot depend on the test source set. `VoterSetTest` is updated to delegate to `VoterSetTestUtil`, so existing call sites are unchanged. - Update `:core` and `:metadata` to use `testFixtures(project(':raft'))` instead of `project(':raft').sourceSets.test.output` - Add `:raft` to `protectedModules` to prevent future regressions
64a892b to
b862e4d
Compare
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.
Gradle test fixtures to the raft module and removes all dependencies on
sourceSets.test.output. We should revisit other usages in this JIRA.
This will simplify the dependency graph and unblock the upgrade to
Gradle 9.5+
This patch is working on raft module
Ref: https://issues.apache.org/jira/browse/KAFKA-20553 Similar to
#22229 (server-common) and
#22244 (storage:storage-api)
java-test-fixturesplugin to:raftMockNetworkChannel,
etc.) from
src/test/tosrc/testFixtures/VoterSetTestUtilin testFixtures to hold the statichelpers
previously in
VoterSetTest. This is necessary becauseMockNetworkChannel(now in testFixtures) referenced
VoterSetTest.DEFAULT_LISTENER_NAME,but
testFixtures cannot depend on the test source set.
VoterSetTestisupdated
to delegate to
VoterSetTestUtil, so existing call sites areunchanged.
:coreand:metadatato usetestFixtures(project(':raft'))instead of
project(':raft').sourceSets.test.output:rafttoprotectedModulesto prevent future regressionsReviewers: Chia-Ping Tsai chia7712@gmail.com