flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [FLINK-1363] [runtime tests] Fix race condition in ExecutionVertexCancelTest.testSendCancelAndReceiveFail
Date Wed, 07 Jan 2015 13:41:50 GMT
Repository: flink
Updated Branches:
  refs/heads/master c52f4cab7 -> 47ec09e10


[FLINK-1363] [runtime tests] Fix race condition in ExecutionVertexCancelTest.testSendCancelAndReceiveFail

This closes #288


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/47ec09e1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/47ec09e1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/47ec09e1

Branch: refs/heads/master
Commit: 47ec09e10ea6807f6c7f6a17273b3eeffe5958b7
Parents: c52f4ca
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Wed Jan 7 10:29:45 2015 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Wed Jan 7 14:40:18 2015 +0100

----------------------------------------------------------------------
 .../executiongraph/ExecutionVertexCancelTest.java      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/47ec09e1/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexCancelTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexCancelTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexCancelTest.java
index a4adda8..ecb1331 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexCancelTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexCancelTest.java
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.mock;
 
 import java.io.IOException;
 
+import akka.actor.Actor;
 import akka.testkit.TestActorRef;
 import akka.actor.ActorRef;
 import akka.actor.ActorSystem;
@@ -210,9 +211,9 @@ public class ExecutionVertexCancelTest {
 					setVertexState(vertex, ExecutionState.SCHEDULED);
 					assertEquals(ExecutionState.SCHEDULED, vertex.getExecutionState());
 
-					// task manager mock actor
+					// task manager cancel sequence mock actor
 					// first return NOT SUCCESS (task not found, cancel call overtook deploy call), then
success (cancel call after deploy call)
-					TestActorRef<?> taskManager = TestActorRef.create(system, Props.create(new
+					TestActorRef<? extends Actor> taskManager = TestActorRef.create(system, Props.create(new
 							CancelSequenceTaskManagerCreator(new
 							TaskOperationResult(execId, false), new TaskOperationResult(execId, true))));
 
@@ -284,7 +285,7 @@ public class ExecutionVertexCancelTest {
 					final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
 					final ExecutionAttemptID execId = vertex.getCurrentExecutionAttempt().getAttemptId();
 
-					final TestActorRef<?> taskManager = TestActorRef.create(system,
+					final TestActorRef<? extends Actor> taskManager = TestActorRef.create(system,
 							Props.create(new CancelSequenceTaskManagerCreator(new
 									TaskOperationResult(execId, true))));
 
@@ -468,8 +469,12 @@ public class ExecutionVertexCancelTest {
 					final ExecutionJobVertex ejv = getExecutionVertex(jid);
 
 					final ExecutionVertex vertex = new ExecutionVertex(ejv, 0, new IntermediateResult[0]);
+					final ExecutionAttemptID execID = vertex.getCurrentExecutionAttempt().getAttemptId();
 
-					final ActorRef taskManager = system.actorOf(Props.create(new CancelSequenceTaskManagerCreator()));
+					final ActorRef taskManager = system.actorOf(
+							Props.create(new CancelSequenceTaskManagerCreator(
+									new TaskOperationResult(execID, true)
+							)));
 
 					Instance instance = getInstance(taskManager);
 					AllocatedSlot slot = instance.allocateSlot(new JobID());


Mime
View raw message