chia7712 commented on code in PR #16210:
URL: https://github.com/apache/kafka/pull/16210#discussion_r1634014444


##########
core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java:
##########
@@ -1018,8 +1018,8 @@ void testRemoteLogManagerRemoteMetrics() throws Exception 
{
                         safeLongYammerMetricValue("RemoteCopyLagBytes,topic=" 
+ leaderTopic),
                         safeLongYammerMetricValue("RemoteCopyLagBytes")));
         TestUtils.waitForCondition(
-                () -> 1 == safeLongYammerMetricValue("RemoteCopyLagSegments") 
&& 1 == safeLongYammerMetricValue("RemoteCopyLagSegments,topic=" + leaderTopic),
-                String.format("Expected to find 1 for RemoteCopyLagSegments 
metric value, but found %d for topic 'Leader' and %d for all topics.",
+                () -> 0 == safeLongYammerMetricValue("RemoteCopyLagSegments") 
&& 0 == safeLongYammerMetricValue("RemoteCopyLagSegments,topic=" + leaderTopic),

Review Comment:
   This is a bit weird to me, as the value of `RemoteCopyLagBytes` is not zero. 
Maybe we should change line#1003 to return `2` instead of `1`



-- 
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