You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/01/09 08:14:50 UTC

[7/7] flink git commit: [hotfix] Remove unnecessary exception catching in StreamingProgramTestBase

[hotfix] Remove unnecessary exception catching in StreamingProgramTestBase


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

Branch: refs/heads/master
Commit: 11287fbf61cd29d0d20ac8f97884d2c08886f71d
Parents: b90210e
Author: Till Rohrmann <tr...@apache.org>
Authored: Mon Jan 8 16:33:51 2018 +0100
Committer: Till Rohrmann <tr...@apache.org>
Committed: Tue Jan 9 08:05:52 2018 +0100

----------------------------------------------------------------------
 .../util/StreamingProgramTestBase.java          | 29 ++------------------
 1 file changed, 3 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/11287fbf/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/StreamingProgramTestBase.java
----------------------------------------------------------------------
diff --git a/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/StreamingProgramTestBase.java b/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/StreamingProgramTestBase.java
index 7093f5d..a18be08 100644
--- a/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/StreamingProgramTestBase.java
+++ b/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/StreamingProgramTestBase.java
@@ -22,8 +22,6 @@ import org.apache.flink.test.util.AbstractTestBase;
 
 import org.junit.Test;
 
-import static org.junit.Assert.fail;
-
 /**
  * Base class for unit tests that run a single test.
  *
@@ -48,33 +46,12 @@ public abstract class StreamingProgramTestBase extends AbstractTestBase {
 	@Test
 	public void testJob() throws Exception {
 		// pre-submit
-		try {
-			preSubmit();
-		}
-		catch (Exception e) {
-			System.err.println(e.getMessage());
-			e.printStackTrace();
-			fail("Pre-submit work caused an error: " + e.getMessage());
-		}
+		preSubmit();
 
 		// call the test program
-		try {
-			testProgram();
-		}
-		catch (Exception e) {
-			System.err.println(e.getMessage());
-			e.printStackTrace();
-			fail("Error while calling the test program: " + e.getMessage());
-		}
+		testProgram();
 
 		// post-submit
-		try {
-			postSubmit();
-		}
-		catch (Exception e) {
-			System.err.println(e.getMessage());
-			e.printStackTrace();
-			fail("Post-submit work caused an error: " + e.getMessage());
-		}
+		postSubmit();
 	}
 }