Repository: flink Updated Branches: refs/heads/master 16ec3d7ea -> e461208a9
[FLINK-8138] [tests] Fix TaskAsyncCallTest#testSetsUserCodeClassLoader The problem was a race condition between the triggerCheckpoint and the wait loop which had as termination condition the number of received trigger checkpoint messages. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/28c2616b Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/28c2616b Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/28c2616b Branch: refs/heads/master Commit: 28c2616b80d4c87229c9e74caf53006776408713 Parents: c73f94e Author: Till Rohrmann <[email protected]> Authored: Fri Feb 23 11:13:22 2018 +0100 Committer: Till Rohrmann <[email protected]> Committed: Sat Feb 24 15:04:38 2018 +0100 ---------------------------------------------------------------------- .../org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/28c2616b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java index 0d9c495..3edf5f1 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskAsyncCallTest.java @@ -56,6 +56,7 @@ import org.apache.flink.runtime.query.TaskKvStateRegistry; import org.apache.flink.runtime.state.TestTaskStateManager; import org.apache.flink.runtime.util.TestingTaskManagerRuntimeInfo; import org.apache.flink.util.SerializedValue; +import org.apache.flink.util.TestLogger; import org.junit.Before; import org.junit.Test; @@ -78,7 +79,7 @@ import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class TaskAsyncCallTest { +public class TaskAsyncCallTest extends TestLogger { /** Number of expected checkpoints. */ private static int numCalls; @@ -289,7 +290,7 @@ public class TaskAsyncCallTest { // wait forever (until canceled) synchronized (this) { - while (error == null && lastCheckpointId < numCalls) { + while (error == null) { wait(); } }
