Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/4980#discussion_r149985097
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java
---
@@ -277,8 +287,12 @@ public void invoke() throws Exception {
}
}
- triggerLatch.trigger();
if (error != null) {
+ // exit method prematurely due to error but
make sure that the tests can finish
+ triggerLatch.trigger();
--- End diff --
I think it doesn't matter because the latch already checks for the flag.
```
public void await() throws InterruptedException {
synchronized (lock) {
while (!triggered) {
lock.wait();
}
}
}
```
---