test(metadata:diskless): add integration tests for managed replicas#542
test(metadata:diskless): add integration tests for managed replicas#542
Conversation
Add ManagedReplicasCluster test class to InklessClusterTest with: - 2-broker cluster with rack assignments (az1, az2) - createDisklessTopicWithManagedReplicas: verifies RF=2, rack-aware placement (one replica per rack), ISR correctness, produce/consume - produceAndConsumeWithClientAZ: tests AZ-aware routing via client ID - nonDisklessTopicDoesNotGetManagedReplicas: verifies non-diskless topics are not affected by managed replicas
There was a problem hiding this comment.
Pull request overview
Adds integration coverage for diskless topics using managed replicas (RF > 1), including rack/AZ-aware placement and client AZ-aware routing, while keeping existing “legacy” inkless cluster tests intact under a clearer name.
Changes:
- Add
InklessManagedReplicasClusterTestexercising RF=2 managed replicas, rack-aware placement, ISR behavior, and produce/consume flows. - Add an AZ-aware routing test using
client.idhint (diskless_az=...) to validate leader selection behavior. - Rename the existing integration test class to
InklessLegacyClusterTest(and update its logger) to reflect its role.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java | New integration tests for managed replicas with rack/AZ-aware behavior and end-to-end produce/consume validation. |
| core/src/test/java/kafka/server/InklessLegacyClusterTest.java | Renames the legacy cluster test class (and logger) for clarity/consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds new integration coverage for diskless topics with managed replicas (RF>1) and corrects the legacy Inkless cluster test class naming to match its filename.
Changes:
- Add
InklessManagedReplicasClusterTestexercising rack-aware managed replica placement, ISR/replica sanity, produce/consume, and AZ-aware routing viaclient.id. - Add a regression check that non-diskless topics are not affected by managed replicas.
- Rename the legacy test class to
InklessLegacyClusterTestand update its logger to match.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java | New 2-broker (rack-aware) TestKit-based integration tests for managed replicas, AZ-aware routing, and non-diskless behavior. |
| core/src/test/java/kafka/server/InklessLegacyClusterTest.java | Fix public class name + logger class reference to match the file name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds new integration coverage for diskless topics with managed replicas (RF>1) in a 2-broker, rack-aware test cluster, and clarifies naming of the existing cluster test by renaming it to “Legacy”.
Changes:
- Introduce
InklessManagedReplicasClusterTestto validate managed replica placement (rack-aware), ISR/replica properties, AZ-aware routing viaclient.id, and non-impact to non-diskless topics. - Rename
InklessClusterTest→InklessLegacyClusterTest(class + logger) to match the file name and avoid confusion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java | New integration tests for managed replicas, rack-aware placement, AZ-aware routing, and non-diskless topic behavior. |
| core/src/test/java/kafka/server/InklessLegacyClusterTest.java | Renames the legacy cluster test class (and logger reference) for consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/kafka/server/InklessManagedReplicasClusterTest.java
Outdated
Show resolved
Hide resolved
…542) Add ManagedReplicasCluster test class to InklessClusterTest with: - 2-broker cluster with rack assignments (az1, az2) - createDisklessTopicWithManagedReplicas: verifies RF=2, rack-aware placement (one replica per rack), ISR correctness, produce/consume - produceAndConsumeWithClientAZ: tests AZ-aware routing via client ID - nonDisklessTopicDoesNotGetManagedReplicas: verifies non-diskless topics are not affected by managed replicas (cherry picked from commit c4143bb)
…542) Add ManagedReplicasCluster test class to InklessClusterTest with: - 2-broker cluster with rack assignments (az1, az2) - createDisklessTopicWithManagedReplicas: verifies RF=2, rack-aware placement (one replica per rack), ISR correctness, produce/consume - produceAndConsumeWithClientAZ: tests AZ-aware routing via client ID - nonDisklessTopicDoesNotGetManagedReplicas: verifies non-diskless topics are not affected by managed replicas
…542) Add ManagedReplicasCluster test class to InklessClusterTest with: - 2-broker cluster with rack assignments (az1, az2) - createDisklessTopicWithManagedReplicas: verifies RF=2, rack-aware placement (one replica per rack), ISR correctness, produce/consume - produceAndConsumeWithClientAZ: tests AZ-aware routing via client ID - nonDisklessTopicDoesNotGetManagedReplicas: verifies non-diskless topics are not affected by managed replicas (cherry picked from commit c4143bb)
Add ManagedReplicasCluster test class to InklessClusterTest (renamed to InklessLegacyClusterTest) with: