lucasbru commented on code in PR #19617: URL: https://github.com/apache/kafka/pull/19617#discussion_r2071176921
########## streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/AdjustStreamThreadCountTest.java: ########## @@ -239,10 +241,30 @@ public void shouldAddAndRemoveThreadsMultipleTimes() throws InterruptedException final CountDownLatch latch = new CountDownLatch(2); final Thread one = adjustCountHelperThread(kafkaStreams, 4, latch); final Thread two = adjustCountHelperThread(kafkaStreams, 6, latch); - two.start(); - one.start(); - latch.await(30, TimeUnit.SECONDS); - assertThat(kafkaStreams.metadataForLocalThreads().size(), equalTo(oldThreadCount)); + Set<ThreadMetadata> threadMetadata = null; + + AssertionError testError = null; + try { + two.start(); + one.start(); + + assertTrue(latch.await(30, TimeUnit.SECONDS)); + one.join(); Review Comment: Doesn't this change the test, since you are joining `one` and `two` before asserting? Not strictly against that, just pointing it out because the PR description only mentions collecting extra logs and fixing a thread leak. -- 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