frankvicky commented on code in PR #16355:
URL: https://github.com/apache/kafka/pull/16355#discussion_r1641587398


##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -1001,6 +1001,30 @@ class PlaintextAdminIntegrationTest extends 
BaseAdminIntegrationTest {
     assertTrue(assertThrows(classOf[ExecutionException], () => 
describeResult2.values.get(invalidTopic).get).getCause.isInstanceOf[InvalidTopicException])
   }
 
+  @ParameterizedTest
+  @ValueSource(strings = Array("zk", "kraft"))
+  def testIncludeDocumentation(quorum: String): Unit = {
+    val consumer = createConsumer()
+    subscribeAndWaitForAssignment(topic, consumer)
+    client = createAdminClient
+
+    val resource = new ConfigResource(ConfigResource.Type.TOPIC, topic)
+    val includeDescribe = new 
DescribeConfigsOptions().includeDocumentation(true)
+    var describeConfigs = 
client.describeConfigs(Collections.singletonList(resource), includeDescribe)
+    val pattern = """documentation=([^,]*?)\)""".r

Review Comment:
   IMHO, it's more precise and robust as it avoids matching commas, ensuring 
the `documentation` value is accurately captured up to the first comma or 
closing.
   But it will be more complicated than `[^,]`
   



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