You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2014/11/17 19:14:14 UTC

incubator-flink git commit: [FLINK-1246] Add additional debug output to flaky recovery test

Repository: incubator-flink
Updated Branches:
  refs/heads/master 2d1532f33 -> f76eb15b6


[FLINK-1246] Add additional debug output to flaky recovery test


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

Branch: refs/heads/master
Commit: f76eb15b65796635f4b8ef62b83933a260f44602
Parents: 2d1532f
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Nov 17 17:26:24 2014 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Mon Nov 17 19:13:02 2014 +0100

----------------------------------------------------------------------
 .../runtime/executiongraph/ExecutionGraph.java  |  4 +++
 .../runtime/jobmanager/RecoveryITCase.java      | 36 ++++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f76eb15b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
index 3df3452..74e48c8 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
@@ -230,6 +230,10 @@ public class ExecutionGraph {
 		return state;
 	}
 	
+	public Throwable getFailureCause() {
+		return failureCause;
+	}
+	
 	public ExecutionJobVertex getJobVertex(JobVertexID id) {
 		return this.tasks.get(id);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/f76eb15b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/RecoveryITCase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/RecoveryITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/RecoveryITCase.java
index 9e259f6..be3e765 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/RecoveryITCase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/RecoveryITCase.java
@@ -86,7 +86,17 @@ public class RecoveryITCase {
 			
 			if (eg != null) {
 				eg.waitForJobEnd();
-				assertEquals(JobStatus.FINISHED, eg.getState());
+				
+				if (eg.getState() != JobStatus.FINISHED) {
+					Throwable t = eg.getFailureCause();
+					String message = null;
+					
+					if (t != null) {
+						t.printStackTrace();
+						message = t.getMessage();
+					}
+					fail("Execution failed despite recovery: " + message);
+				}
 			}
 			else {
 				// already done, that was fast;
@@ -152,7 +162,17 @@ public class RecoveryITCase {
 			
 			if (eg != null) {
 				eg.waitForJobEnd();
-				assertEquals(JobStatus.FINISHED, eg.getState());
+				
+				if (eg.getState() != JobStatus.FINISHED) {
+					Throwable t = eg.getFailureCause();
+					String message = null;
+					
+					if (t != null) {
+						t.printStackTrace();
+						message = t.getMessage();
+					}
+					fail("Execution failed despite recovery: " + message);
+				}
 			}
 			else {
 				// already done, that was fast;
@@ -225,7 +245,17 @@ public class RecoveryITCase {
 			// wait for the recovery to do its work
 			if (eg != null) {
 				eg.waitForJobEnd();
-				assertEquals(JobStatus.FINISHED, eg.getState());
+				
+				if (eg.getState() != JobStatus.FINISHED) {
+					Throwable t = eg.getFailureCause();
+					String message = null;
+					
+					if (t != null) {
+						t.printStackTrace();
+						message = t.getMessage();
+					}
+					fail("Execution failed despite recovery: " + message);
+				}
 			}
 			else {
 				// already done, that was fast;