chia7712 commented on a change in pull request #9887: URL: https://github.com/apache/kafka/pull/9887#discussion_r557431921
########## File path: streams/src/test/java/org/apache/kafka/streams/integration/AdjustStreamThreadCountTest.java ########## @@ -230,4 +235,33 @@ public void shouldAddAndRemoveStreamThreadsWhileKeepingNamesCorrect() throws Exc waitForApplicationState(Collections.singletonList(kafkaStreams), KafkaStreams.State.RUNNING, DEFAULT_DURATION); } } + + @Test + public void testConcurrentlyAccessThreads() throws InterruptedException { Review comment: This test case can cause following exception if we don't apply this patch. ``` org.apache.kafka.streams.integration.AdjustStreamThreadCountTest > testConcurrentlyAccessThreads FAILED java.lang.AssertionError: expected null, but was:<java.util.ConcurrentModificationException> at org.junit.Assert.fail(Assert.java:89) at org.junit.Assert.failNotNull(Assert.java:756) at org.junit.Assert.assertNull(Assert.java:738) at org.junit.Assert.assertNull(Assert.java:748) at org.apache.kafka.streams.integration.AdjustStreamThreadCountTest.testConcurrentlyAccessThreads(AdjustStreamThreadCountTest.java:264) ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org