lihaosky commented on code in PR #12944: URL: https://github.com/apache/kafka/pull/12944#discussion_r1040472261
########## streams/src/test/java/org/apache/kafka/streams/KafkaStreamsTest.java: ########## @@ -1088,6 +1088,28 @@ public void shouldTriggerRecordingOfRocksDBMetricsIfRecordingLevelIsDebug() { } } + @Test + public void shouldGetClientSupplierFromConfigForConstructor() { + final StreamsConfig config = new StreamsConfig(props); + final StreamsConfig mockConfig = spy(config); + when(mockConfig.getKafkaClientSupplier()).thenReturn(supplier); + + new KafkaStreams(getBuilderWithSource().build(), mockConfig); + // It's called once in above when mock + verify(mockConfig, times(2)).getKafkaClientSupplier(); Review Comment: Somehow above `when(mockConfig.getKafkaClientSupplier()).thenReturn(supplier);` is counted. ########## streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java: ########## @@ -1727,6 +1738,15 @@ public static Set<String> verifyTopologyOptimizationConfigs(final String config) return verifiedConfigs; } + /** + * Return configured KafkaClientSupplier + * @return Configured KafkaClientSupplier + */ + public KafkaClientSupplier getKafkaClientSupplier() { Review Comment: Sure. Will update the KIP. ########## streams/src/test/java/org/apache/kafka/streams/KafkaStreamsTest.java: ########## @@ -1088,6 +1088,28 @@ public void shouldTriggerRecordingOfRocksDBMetricsIfRecordingLevelIsDebug() { } } + @Test + public void shouldGetClientSupplierFromConfigForConstructor() { Review Comment: Sure. -- 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