flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject flink git commit: [FLINK-2400] [tests] Improve error message on unexpected TaskTest message
Date Thu, 23 Jul 2015 14:47:10 GMT
Repository: flink
Updated Branches:
  refs/heads/master c52e753a8 -> fa78be6df


[FLINK-2400] [tests] Improve error message on unexpected TaskTest message


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

Branch: refs/heads/master
Commit: fa78be6df45213406cb9b8a6299ca1f4bc085191
Parents: c52e753
Author: Ufuk Celebi <uce@apache.org>
Authored: Thu Jul 23 16:45:58 2015 +0200
Committer: Ufuk Celebi <uce@apache.org>
Committed: Thu Jul 23 16:46:52 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/flink/runtime/taskmanager/TaskTest.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/fa78be6d/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
index bd36dd4..4631996 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
@@ -772,7 +772,9 @@ public class TaskTest {
 			Object rawMessage = taskManagerMessages.poll(10, TimeUnit.SECONDS);
 			
 			assertNotNull("There is no additional TaskManager message", rawMessage);
-			assertTrue("TaskManager message is not 'UnregisterTask'", rawMessage instanceof TaskMessages.TaskInFinalState);
+			if (!(rawMessage instanceof TaskMessages.TaskInFinalState)) {
+				fail("TaskManager message is not 'UnregisterTask', but " + rawMessage.getClass());
+			}
 			
 			TaskMessages.TaskInFinalState message = (TaskMessages.TaskInFinalState) rawMessage;
 			assertEquals(id, message.executionID());
@@ -789,8 +791,9 @@ public class TaskTest {
 			Object rawMessage = taskManagerMessages.poll(10, TimeUnit.SECONDS);
 
 			assertNotNull("There is no additional TaskManager message", rawMessage);
-			assertTrue("TaskManager message is not 'UpdateTaskExecutionState'", 
-					rawMessage instanceof TaskMessages.UpdateTaskExecutionState);
+			if (!(rawMessage instanceof TaskMessages.UpdateTaskExecutionState)) {
+				fail("TaskManager message is not 'UpdateTaskExecutionState', but " + rawMessage.getClass());
+			}
 			
 			TaskMessages.UpdateTaskExecutionState message =
 					(TaskMessages.UpdateTaskExecutionState) rawMessage;


Mime
View raw message