frankvicky commented on code in PR #18767: URL: https://github.com/apache/kafka/pull/18767#discussion_r1938401550
########## clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java: ########## @@ -96,6 +100,20 @@ public void testParseAndValidateAddressesWithReverseLookup() { } } + static Stream<List<String>> provideBrokerListTestCases() { Review Comment: I think the name is not clear. How about providing `provideValidBrokerAddressTestCases` ? ########## clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java: ########## @@ -96,6 +100,20 @@ public void testParseAndValidateAddressesWithReverseLookup() { } } + static Stream<List<String>> provideBrokerListTestCases() { + return Stream.of( + Arrays.asList("localhost:9997", "localhost:9998", "localhost:9999"), + // Intentionally provide a single string, as users may provide space-separated brokers, which will be parsed as a single string. + Arrays.asList("localhost:9997 localhost:9998 localhost:9999") Review Comment: Could you use `List.of` instead of `Arrays.asList` ? ########## clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java: ########## @@ -96,6 +100,20 @@ public void testParseAndValidateAddressesWithReverseLookup() { } } + static Stream<List<String>> provideBrokerListTestCases() { + return Stream.of( + Arrays.asList("localhost:9997", "localhost:9998", "localhost:9999"), + // Intentionally provide a single string, as users may provide space-separated brokers, which will be parsed as a single string. + Arrays.asList("localhost:9997 localhost:9998 localhost:9999") + ); + } + + @ParameterizedTest + @MethodSource("provideBrokerListTestCases") + public void testValidBrokerList(List<String> brokerList) { Review Comment: Ditto, naming issue. One nit: Introduing type to the variable name is not good. -- 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