ahuang98 commented on code in PR #17139:
URL: https://github.com/apache/kafka/pull/17139#discussion_r1913886861


##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -3098,31 +3098,53 @@ public void testPollIdleRatio(GroupProtocol 
groupProtocol) {
         assertEquals(Double.NaN, 
consumer.metrics().get(pollIdleRatio).metricValue());
 
         // 1st poll
-        // Spend 50ms in poll so value = 1.0
+        // Spend 50ms in poll. value=NaN because "the fraction of time spent 
inside poll" is undefined until the polling interval has an end point,

Review Comment:
   I realize there isn't a benefit to adding the additional sleep, 
recordPollStart (at least at that commit) doesn't factor in time before the 
first pollStart



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