apoorvmittal10 commented on code in PR #14621: URL: https://github.com/apache/kafka/pull/14621#discussion_r1378834102
########## core/src/test/scala/unit/kafka/server/ControllerConfigurationValidatorTest.scala: ########## @@ -101,4 +102,55 @@ class ControllerConfigurationValidatorTest { assertThrows(classOf[InvalidRequestException], () => validator.validate( new ConfigResource(BROKER, "-1"), config)). getMessage()) } + + @Test + def testValidClientMetricsConfig(): Unit = { + val config = new TreeMap[String, String]() + config.put(ClientMetricsConfigs.PUSH_INTERVAL_MS, "2000") + config.put(ClientMetricsConfigs.SUBSCRIPTION_METRICS, "org.apache.kafka.client.producer.partition.queue.,org.apache.kafka.client.producer.partition.latency") + config.put(ClientMetricsConfigs.CLIENT_MATCH_PATTERN, "client_instance_id=b69cc35a-7a54-4790-aa69-cc2bd4ee4538,client_id=1" + + ",client_software_name=apache-kafka-java,client_software_version=2.8.0-SNAPSHOT,client_source_address=127.0.0.1," + + "client_source_port=1234") + validator.validate(new ConfigResource(CLIENT_METRICS, "subscription-1"), config) + } + + @Test + def testInvalidSubscriptionIdClientMetricsConfig(): Unit = { Review Comment: Corrected the method name. -- 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