This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/4.0 by this push:
     new a9a535d741d MINOR: Remove the test for ZooKeeper metrics used by 
ZooKeeperClient (#18775)
a9a535d741d is described below

commit a9a535d741d7781a8bfaf9f2f54eef888ad9035a
Author: Jhen-Yung Hsu <[email protected]>
AuthorDate: Mon Feb 3 20:06:01 2025 +0800

    MINOR: Remove the test for ZooKeeper metrics used by ZooKeeperClient 
(#18775)
    
    Reviewers: Ismael Juma <[email protected]>, Ken Huang <[email protected]>, 
Chia-Ping Tsai <[email protected]>
---
 .../src/test/scala/unit/kafka/metrics/MetricsTest.scala | 17 -----------------
 docs/zk2kraft.html                                      |  7 +++++++
 2 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala 
b/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
index b1bc03b6ff4..5c795a0e68f 100644
--- a/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
+++ b/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
@@ -234,23 +234,6 @@ class MetricsTest extends KafkaServerTestHarness with 
Logging {
     })
   }
 
-  /**
-   * Test that the metrics are created with the right name, 
testZooKeeperStateChangeRateMetrics
-   * and testZooKeeperSessionStateMetric in ZooKeeperClientTest test the 
metrics behaviour.
-   */
-  @ParameterizedTest
-  @ValueSource(strings = Array("kraft"))
-  def testSessionExpireListenerMetrics(quorum: String): Unit = {
-    val metrics = KafkaYammerMetrics.defaultRegistry.allMetrics
-    val expectedNumMetrics = 0
-    assertEquals(expectedNumMetrics, metrics.keySet.asScala.
-      count(_.getMBeanName == 
"kafka.server:type=SessionExpireListener,name=SessionState"))
-    assertEquals(expectedNumMetrics, metrics.keySet.asScala.
-      count(_.getMBeanName == 
"kafka.server:type=SessionExpireListener,name=ZooKeeperExpiresPerSec"))
-    assertEquals(expectedNumMetrics, metrics.keySet.asScala.
-      count(_.getMBeanName == 
"kafka.server:type=SessionExpireListener,name=ZooKeeperDisconnectsPerSec"))
-  }
-
   private def topicMetrics(topic: Option[String]): Set[String] = {
     val metricNames = 
KafkaYammerMetrics.defaultRegistry.allMetrics().keySet.asScala.map(_.getMBeanName)
     filterByTopicMetricRegex(metricNames, topic)
diff --git a/docs/zk2kraft.html b/docs/zk2kraft.html
index c94949dff12..f2c2153b6dd 100644
--- a/docs/zk2kraft.html
+++ b/docs/zk2kraft.html
@@ -198,6 +198,13 @@
                 
<li><code>kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=topic</code></li>
                 
<li><code>kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ElectLeader</code></li>
                 
<li><code>kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=topic</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=SessionState</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperAuthFailuresPerSec</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperDisconnectsPerSec</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperExpiresPerSec</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperReadOnlyConnectsPerSec</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperSaslAuthenticationsPerSec</code></li>
+                
<li><code>kafka.server:type=SessionExpireListener,name=ZooKeeperSyncConnectsPerSec</code></li>
                 
<li><code>kafka.server:type=ZooKeeperClientMetrics,name=ZooKeeperRequestLatencyMs</code></li>
             </ul>
         </li>

Reply via email to