chia7712 commented on code in PR #15800: URL: https://github.com/apache/kafka/pull/15800#discussion_r1586042610
########## core/src/test/java/kafka/test/junit/ClusterTestExtensions.java: ########## @@ -118,16 +118,15 @@ public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContex return generatedContexts.stream(); } - private void processClusterTemplate(ExtensionContext context, ClusterTemplate annot, + void processClusterTemplate(ExtensionContext context, ClusterTemplate annot, Consumer<TestTemplateInvocationContext> testInvocations) { // If specified, call cluster config generated method (must be static) List<ClusterConfig> generatedClusterConfigs = new ArrayList<>(); - if (!annot.value().isEmpty()) { - generateClusterConfigurations(context, annot.value(), generatedClusterConfigs::add); - } else { - // Ensure we have at least one cluster config - generatedClusterConfigs.add(ClusterConfig.defaultBuilder().build()); + + if (annot.value().isEmpty()) { Review Comment: How about `if (annot.value().trim().isEmpty()) throw new IllegalStateException("ClusterTemplate value can't be empty string");` -- 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