[
https://issues.apache.org/jira/browse/KAFKA-18078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17900587#comment-17900587
]
Chia-Ping Tsai commented on KAFKA-18078:
----------------------------------------
The root cause is that in KRaft mode, KafkaYammerMetrics.INSTANCE is configured
by KafkaRaftServer [0], which is not executed by the test infrastructure. In
contrast, in ZK mode, KafkaYammerMetrics.INSTANCE is configured by KafkaServer
[1], so it is in the execution path of the test infrastructure.
[0]
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/KafkaRaftServer.scala#L57
[1]
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/KafkaServer.scala#L277
> Fix failed MetricsTest.testJMXFilter
> ------------------------------------
>
> Key: KAFKA-18078
> URL: https://issues.apache.org/jira/browse/KAFKA-18078
> Project: Kafka
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Priority: Major
>
> Gradle Test Run :core:test > Gradle Test Executor 37 > MetricsTest >
> testJMXFilter(String) > "testJMXFilter(String).quorum=zk" FAILED
> org.opentest4j.AssertionFailedError: 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.AssertTrue.assertTrue(AssertTrue.java:31)
> at
> app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
> at app//kafka.metrics.MetricsTest.testJMXFilter(MetricsTest.scala:128)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)