[ https://issues.apache.org/jira/browse/KAFKA-17114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias J. Sax resolved KAFKA-17114. ------------------------------------- Resolution: Cannot Reproduce We did push some fixed for related tickets. Closing this for now. > DefaultStateUpdater::handleRuntimeException should update isRunning before > calling `addToExceptionsAndFailedTasksThenClearUpdatingAndPausedTasks` > ------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-17114 > URL: https://issues.apache.org/jira/browse/KAFKA-17114 > Project: Kafka > Issue Type: Test > Components: streams, unit tests > Affects Versions: 3.9.0 > Reporter: Ao Li > Priority: Minor > > I saw a flaky test in > DefaultStateUpdaterTest::shouldThrowIfAddingStandbyAndActiveTaskWithSameId > recently. > {code} > org.opentest4j.AssertionFailedError: expected: <false> but was: <true> > at > org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) > at > org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) > at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63) > at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36) > at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31) > at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231) > at > org.apache.kafka.streams.processor.internals.DefaultStateUpdaterTest.shouldThrowIfAddingTasksWithSameId(DefaultStateUpdaterTest.java:294) > at > org.apache.kafka.streams.processor.internals.DefaultStateUpdaterTest.shouldThrowIfAddingStandbyAndActiveTaskWithSameId(DefaultStateUpdaterTest.java:285) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) > at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) > {code} > To make the bug more reproducible, you may add `Thread.sleep(5)` after > `addToExceptionsAndFailedTasksThenClearUpdatingAndPausedTasks(runtimeException);` > in DefaultStateUpdater::handleRuntimeException > The test is flaky because > `addToExceptionsAndFailedTasksThenClearUpdatingAndPausedTasks(runtimeException);` > will unblock the `verifyFailedTasks(IllegalStateException.class, task1);` > statement in DefaultStateUpdaterTest::shouldThrowIfAddingTasksWithSameId. > If `assertFalse(stateUpdater.isRunning());` is executed before > `isRunning.set(false);` the test will fail -- This message was sent by Atlassian Jira (v8.20.10#820010)