dongjinleekr commented on a change in pull request #7898: URL: https://github.com/apache/kafka/pull/7898#discussion_r829746139
########## File path: streams/src/test/java/org/apache/kafka/streams/StreamsConfigTest.java ########## @@ -1024,55 +1033,61 @@ public void shouldThrowConfigExceptionWhenOptimizationConfigNotValueInRange() { @SuppressWarnings("deprecation") @Test public void shouldLogWarningWhenEosAlphaIsUsed() { - props.put(StreamsConfig.PROCESSING_GUARANTEE_CONFIG, StreamsConfig.EXACTLY_ONCE); + try (final LogCaptureContext logCaptureContext = LogCaptureContext.create( + Collections.singletonMap(StreamsConfig.class.getName(), "DEBUG") + )) { + logCaptureContext.setLatch(3); - LogCaptureAppender.setClassLoggerToDebug(StreamsConfig.class); - try (final LogCaptureAppender appender = LogCaptureAppender.createAndRegister(StreamsConfig.class)) { + props.put(StreamsConfig.PROCESSING_GUARANTEE_CONFIG, StreamsConfig.EXACTLY_ONCE); new StreamsConfig(props); assertThat( - appender.getMessages(), - hasItem("Configuration parameter `" + StreamsConfig.EXACTLY_ONCE + - "` is deprecated and will be removed in the 4.0.0 release. " + - "Please use `" + StreamsConfig.EXACTLY_ONCE_V2 + "` instead. " + - "Note that this requires broker version 2.5+ so you should prepare " + - "to upgrade your brokers if necessary.") + logCaptureContext.getMessages(), + hasItem("WARN Configuration parameter `" + StreamsConfig.EXACTLY_ONCE + + "` is deprecated and will be removed in the 4.0.0 release. " + + "Please use `" + StreamsConfig.EXACTLY_ONCE_V2 + "` instead. " + + "Note that this requires broker version 2.5+ so you should prepare " + + "to upgrade your brokers if necessary. ") Review comment: Because of `streams/src/test/resources/log4j2.properties`: ``` appender.console.layout.pattern=[%d] %p %m (%c:%L)%n ``` -- 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