johnnychhsu commented on code in PR #15861: URL: https://github.com/apache/kafka/pull/15861#discussion_r1601756235
########## core/src/test/java/kafka/test/ClusterTestExtensionsTest.java: ########## @@ -84,37 +85,47 @@ public void testClusterTest(ClusterInstance clusterInstance) { public void testClusterTemplate() { Assertions.assertEquals(Type.ZK, clusterInstance.type(), "generate1 provided a Zk cluster, so we should see that here"); - Assertions.assertEquals("Generated Test", clusterInstance.config().name().orElse(""), - "generate1 named this cluster config, so we should see that here"); Assertions.assertEquals("bar", clusterInstance.config().serverProperties().get("foo")); } // Multiple @ClusterTest can be used with @ClusterTests @ClusterTests({ - @ClusterTest(name = "cluster-tests-1", types = {Type.ZK}, serverProperties = { + @ClusterTest(types = {Type.ZK}, serverProperties = { @ClusterConfigProperty(key = "foo", value = "bar"), @ClusterConfigProperty(key = "spam", value = "eggs"), @ClusterConfigProperty(id = 86400, key = "baz", value = "qux"), // this one will be ignored as there is no broker id is 86400 + @ClusterConfigProperty(key = "spam", value = "eggs") + }, tags = { + "default.display.key1", "default.display.key2" }), - @ClusterTest(name = "cluster-tests-2", types = {Type.KRAFT}, serverProperties = { + @ClusterTest(types = {Type.KRAFT}, serverProperties = { @ClusterConfigProperty(key = "foo", value = "baz"), @ClusterConfigProperty(key = "spam", value = "eggz"), @ClusterConfigProperty(key = "default.key", value = "overwrite.value"), @ClusterConfigProperty(id = 0, key = "queued.max.requests", value = "200"), - @ClusterConfigProperty(id = 3000, key = "queued.max.requests", value = "300") + @ClusterConfigProperty(id = 3000, key = "queued.max.requests", value = "300"), + @ClusterConfigProperty(key = "spam", value = "eggs"), + @ClusterConfigProperty(key = "default.key", value = "overwrite.value") + }, tags = { + "default.display.key1", "default.display.key2" }), - @ClusterTest(name = "cluster-tests-3", types = {Type.CO_KRAFT}, serverProperties = { + @ClusterTest(types = {Type.CO_KRAFT}, serverProperties = { @ClusterConfigProperty(key = "foo", value = "baz"), @ClusterConfigProperty(key = "spam", value = "eggz"), @ClusterConfigProperty(key = "default.key", value = "overwrite.value"), - @ClusterConfigProperty(id = 0, key = "queued.max.requests", value = "200") + @ClusterConfigProperty(id = 0, key = "queued.max.requests", value = "200"), + @ClusterConfigProperty(key = "spam", value = "eggs"), + @ClusterConfigProperty(key = "default.key", value = "overwrite.value") + }, tags = { + "default.display.key1", "default.display.key2" }) }) public void testClusterTests() throws ExecutionException, InterruptedException { if (!clusterInstance.isKRaftTest()) { Assertions.assertEquals("bar", clusterInstance.config().serverProperties().get("foo")); Assertions.assertEquals("eggs", clusterInstance.config().serverProperties().get("spam")); Assertions.assertEquals("default.value", clusterInstance.config().serverProperties().get("default.key")); + Assertions.assertArrayEquals(new String[]{"default.display.key1", "default.display.key2"}, clusterInstance.config().tags().toArray()); Review Comment: thanks for the comment! let me change that -- 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