Skip to content

test(metadata:diskless): add integration tests for managed replicas#542

Merged
jeqo merged 2 commits intomainfrom
jeqo/pod-1952-managed-replica-e2e-test
Mar 17, 2026
Merged

test(metadata:diskless): add integration tests for managed replicas#542
jeqo merged 2 commits intomainfrom
jeqo/pod-1952-managed-replica-e2e-test

Conversation

@jeqo
Copy link
Copy Markdown
Contributor

@jeqo jeqo commented Mar 17, 2026

Add ManagedReplicasCluster test class to InklessClusterTest (renamed to InklessLegacyClusterTest) 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

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 InklessManagedReplicasClusterTest exercising RF=2 managed replicas, rack-aware placement, ISR behavior, and produce/consume flows.
  • Add an AZ-aware routing test using client.id hint (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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 InklessManagedReplicasClusterTest exercising rack-aware managed replica placement, ISR/replica sanity, produce/consume, and AZ-aware routing via client.id.
  • Add a regression check that non-diskless topics are not affected by managed replicas.
  • Rename the legacy test class to InklessLegacyClusterTest and 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 InklessManagedReplicasClusterTest to validate managed replica placement (rack-aware), ISR/replica properties, AZ-aware routing via client.id, and non-impact to non-diskless topics.
  • Rename InklessClusterTestInklessLegacyClusterTest (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.

@jeqo jeqo marked this pull request as ready for review March 17, 2026 13:06
@jeqo jeqo merged commit c4143bb into main Mar 17, 2026
4 checks passed
@jeqo jeqo deleted the jeqo/pod-1952-managed-replica-e2e-test branch March 17, 2026 16:41
AnatolyPopov pushed a commit that referenced this pull request Mar 23, 2026
…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)
jeqo added a commit that referenced this pull request Mar 23, 2026
…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
jeqo added a commit that referenced this pull request Mar 23, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants