You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ao Li (Jira)" <ji...@apache.org> on 2024/08/21 16:14:00 UTC

[jira] [Assigned] (KAFKA-17394) Flaky test in DefaultTaskExecutorTest.shouldSetUncaughtStreamsException

     [ https://issues.apache.org/jira/browse/KAFKA-17394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ao Li reassigned KAFKA-17394:
-----------------------------

    Assignee: TengYao Chi

> Flaky test in DefaultTaskExecutorTest.shouldSetUncaughtStreamsException
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-17394
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17394
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ao Li
>            Assignee: TengYao Chi
>            Priority: Major
>
> Another flaky test caused by non-atomic operation in DefaultTaskExecutor. Please use https://github.com/aoli-al/kafka/tree/KAFKA-249 this fork to reproduce the failure.  Command:  ./gradlew :streams:test --tests DefaultTaskExecutorTest.shouldSetUncaughtStreamsException
> Exception: 
> {code}
> org.opentest4j.AssertionFailedError: expected: <null> but was: <or...@1e469dfd>
> 	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.AssertNull.failNotNull(AssertNull.java:50)
> 	at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:35)
> 	at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:30)
> 	at org.junit.jupiter.api.Assertions.assertNull(Assertions.java:279)
> 	at org.apache.kafka.streams.processor.internals.tasks.DefaultTaskExecutorTest.shouldSetUncaughtStreamsException(DefaultTaskExecutorTest.java:254)
> 	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}
> The root cause is that the operation in DefaultTaskExecutor:unassignCurrentTask is not atomic: 
> {code}
>             // This operation unblocks the verify statement in test
>             taskManager.unassignTask(currentTask, DefaultTaskExecutor.this); 
>             final StreamTask retTask = currentTask;
>             // This operation sets the currentTask to null. 
>             currentTask = null;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)