Skip to content

KAFKA-18486: Migrate ReplicaManagerTest to use applyDelta #19952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

FrankYang0529
Copy link
Member

@FrankYang0529 FrankYang0529 commented Jun 12, 2025

Change becomeLeaderOrFollower to applyDelta in following test cases

  • testOffsetOutOfRangeExceptionWhenFetchMessages
  • testOffsetOutOfRangeExceptionWhenReadFromLog
  • testOldFollowerLosesMetricsWhenReassignPartitions
  • testOldLeaderLosesMetricsWhenReassignPartitions

Reviewers: Bolin Lin linbolin1230@gmail.com, Lan Ding
isDing_L@163.com, Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

Signed-off-by: PoAn Yang <payang@apache.org>
@github-actions github-actions bot added core Kafka Broker tests Test fixes (including flaky tests) labels Jun 12, 2025
Copy link
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@FrankYang0529 FrankYang0529 requested a review from chia7712 June 12, 2025 12:10
Copy link
Contributor

@DL1231 DL1231 left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, LGTM

Copy link
Contributor

@YutaLin YutaLin left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, LGTM

@@ -3603,7 +3544,6 @@ class ReplicaManagerTest {

// verify that broker 1 did remove its metrics when no longer being the leader of partition 1
verify(mockTopicStats1).removeOldLeaderMetrics(topic)
verify(mockTopicStats1).removeOldFollowerMetrics(topic)
Copy link
Member

Choose a reason for hiding this comment

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

This removal is legal as the method is a no-op actually. I have opened https://issues.apache.org/jira/browse/KAFKA-19406 to clean up.

@chia7712 chia7712 merged commit 991a10c into apache:trunk Jun 13, 2025
28 checks passed
@FrankYang0529 FrankYang0529 deleted the KAFKA-18486 branch June 13, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Kafka Broker tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants