akalash commented on a change in pull request #17559:
URL: https://github.com/apache/flink/pull/17559#discussion_r735544012
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
##########
@@ -1133,23 +1133,27 @@ public InvokableWithExceptionOnTrigger(Environment
environment) {
@Override
public void invoke() {
- awaitLatch.trigger();
-
- // make sure that the interrupt call does not
- // grab us out of the lock early
- while (true) {
- try {
- triggerLatch.await();
- break;
- } catch (InterruptedException e) {
- // fall through the loop
- }
- }
+ awaitTriggerLatch();
throw new RuntimeException("test");
}
}
+ private static void awaitTriggerLatch() {
+ awaitLatch.trigger();
+
+ // make sure that the interrupt call does not
+ // grab us out of the lock early
+ while (true) {
+ try {
+ triggerLatch.await();
+ break;
+ } catch (InterruptedException e) {
Review comment:
I still don't really understand who can interrupt the thread without
explicit calling of one of the task interruption methods(like
Task#cancelExecution, Task#failExternally etc.). But comparing
testCancelTaskExceptionAfterTaskMarkedFailed with
testExecutionFailsAfterTaskMarkedFailed shows that highly likely it is exactly
what happens.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]