bozhao12 commented on code in PR #12056:
URL: https://github.com/apache/kafka/pull/12056#discussion_r867963084


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -2427,7 +2427,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)

Review Comment:
   @dajac  Because the original code logic partition only appear from Leader To 
Follower , only the removeOldLeaderMetrics method will be executed. If this 
line of removeOldFollowerMetrics  code is not removed, the test will fail.
   If we want to keep 
   `verify(mockTopicStats1).removeOldFollowerMetrics(topic),` 
   I think the good way is to modify the method annotation instead of modifying 
the test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to