frankvicky commented on code in PR #16355: URL: https://github.com/apache/kafka/pull/16355#discussion_r1641587447
########## 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 + var resourceToConfig = describeConfigs.all().get() + var matches = pattern.findAllMatchIn(resourceToConfig.toString) + var describes = matches.map(e => e.group(1)).toList + describes.foreach(e => assertNotNull(e)) Review Comment: Yes, you're right, in this case it will the `null` of string literal, not actually `null` -- 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