[
https://issues.apache.org/jira/browse/KAFKA-16346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869773#comment-17869773
]
PoAn Yang commented on KAFKA-16346:
-----------------------------------
Hi [~chia7712], may we change the status to resolved, because related PR is
merged? Thanks.
> Fix flaky MetricsTest.testMetrics
> ---------------------------------
>
> Key: KAFKA-16346
> URL: https://issues.apache.org/jira/browse/KAFKA-16346
> Project: Kafka
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: PoAn Yang
> Priority: Minor
>
> {code}
> Gradle Test Run :core:test > Gradle Test Executor 1119 > MetricsTest >
> testMetrics(boolean) > testMetrics with systemRemoteStorageEnabled: false
> FAILED
> org.opentest4j.AssertionFailedError: Broker metric not recorded correctly
> for
> kafka.network:type=RequestMetrics,name=MessageConversionsTimeMs,request=Produce
> value 0.0 ==> expected: <true> but was: <false>
> at
> app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
> at
> app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
> at
> app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
> at
> app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
> at
> app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
> at
> app//kafka.api.MetricsTest.verifyBrokerMessageConversionMetrics(MetricsTest.scala:314)
> at app//kafka.api.MetricsTest.testMetrics(MetricsTest.scala:110)
> {code}
> The value used to update metrics is calculated by Math.round, so it could be
> zero if you have a good machine :)
> We should verify the `count` instead of `value`, since it is convincible and
> more stable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)