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-1816] [gelly tests] Fixes wrongly introduced exception checks in DegreesWithExceptionITCase
Date Thu, 02 Apr 2015 14:09:07 GMT
Repository: flink
Updated Branches:
  refs/heads/master 00759257a -> 10d20bff2


[FLINK-1816] [gelly tests] Fixes wrongly introduced exception checks in DegreesWithExceptionITCase


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

Branch: refs/heads/master
Commit: 10d20bff289ea5f27e4c04b49a4dcb349fbf6ce6
Parents: 0075925
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Thu Apr 2 11:28:38 2015 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Thu Apr 2 11:28:38 2015 +0200

----------------------------------------------------------------------
 .../operations/DegreesWithExceptionITCase.java  | 34 ++++++--------------
 1 file changed, 10 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/10d20bff/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
index 6c195cb..489e50a 100644
--- a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
+++ b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
@@ -21,19 +21,15 @@ package org.apache.flink.graph.test.operations;
 import org.apache.flink.api.java.ExecutionEnvironment;
 import org.apache.flink.api.java.io.DiscardingOutputFormat;
 import org.apache.flink.api.java.tuple.Tuple2;
-import org.apache.flink.client.program.ProgramInvocationException;
 import org.apache.flink.configuration.ConfigConstants;
 import org.apache.flink.configuration.Configuration;
 import org.apache.flink.graph.Graph;
 import org.apache.flink.graph.test.TestGraphUtils;
-import org.apache.flink.runtime.client.JobExecutionException;
 import org.apache.flink.test.util.ForkableFlinkMiniCluster;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.util.NoSuchElementException;
-
 import static org.junit.Assert.*;
 
 public class DegreesWithExceptionITCase {
@@ -84,11 +80,9 @@ public class DegreesWithExceptionITCase {
 			graph.outDegrees().output(new DiscardingOutputFormat<Tuple2<Long, Long>>());
 			env.execute();
 
-			fail("graph.outDegrees() did not throw NoSuchElementException");
+			fail("graph.outDegrees() did not fail.");
 		} catch (Exception e) {
-			assertTrue("Root exception has to be of type ProgramInvocationException.", e instanceof
ProgramInvocationException);
-			assertTrue("ProgramInvocationException's cause has to be of type JobExecutionException.",
e.getCause() instanceof JobExecutionException);
-			assertTrue("JobExecutionException's cause has to be of type NoSuchElementException.",
e.getCause().getCause() instanceof NoSuchElementException);
+			// We expect the job to fail with an exception
 		}
 	}
 
@@ -109,11 +103,9 @@ public class DegreesWithExceptionITCase {
 			graph.inDegrees().output(new DiscardingOutputFormat<Tuple2<Long, Long>>());
 			env.execute();
 
-			fail("graph.inDegrees() did not throw NoSuchElementException");
+			fail("graph.inDegrees() did not fail.");
 		} catch (Exception e) {
-			assertTrue("Root exception has to be of type ProgramInvocationException.", e instanceof
ProgramInvocationException);
-			assertTrue("ProgramInvocationException's cause has to be of type JobExecutionException.",
e.getCause() instanceof JobExecutionException);
-			assertTrue("JobExecutionException's cause has to be of type NoSuchElementException.",
e.getCause().getCause() instanceof NoSuchElementException);
+			// We expect the job to fail with an exception
 		}
 	}
 
@@ -134,11 +126,9 @@ public class DegreesWithExceptionITCase {
 			graph.getDegrees().output(new DiscardingOutputFormat<Tuple2<Long, Long>>());
 			env.execute();
 
-			fail("graph.getDegrees() did not throw NoSuchElementException");
+			fail("graph.getDegrees() did not fail.");
 		} catch (Exception e) {
-			assertTrue("Root exception has to be of type ProgramInvocationException.", e instanceof
ProgramInvocationException);
-			assertTrue("ProgramInvocationException's cause has to be of type JobExecutionException.",
e.getCause() instanceof JobExecutionException);
-			assertTrue("JobExecutionException's cause has to be of type NoSuchElementException.",
e.getCause().getCause() instanceof NoSuchElementException);
+			// We expect the job to fail with an exception
 		}
 	}
 
@@ -159,11 +149,9 @@ public class DegreesWithExceptionITCase {
 			graph.getDegrees().output(new DiscardingOutputFormat<Tuple2<Long, Long>>());
 			env.execute();
 
-			fail("graph.getDegrees() did not throw NoSuchElementException");
+			fail("graph.getDegrees() did not fail.");
 		} catch (Exception e) {
-			assertTrue("Root exception has to be of type ProgramInvocationException.", e instanceof
ProgramInvocationException);
-			assertTrue("ProgramInvocationException's cause has to be of type JobExecutionException.",
e.getCause() instanceof JobExecutionException);
-			assertTrue("JobExecutionException's cause has to be of type NoSuchElementException.",
e.getCause().getCause() instanceof NoSuchElementException);
+			// We expect the job to fail with an exception
 		}
 	}
 
@@ -184,11 +172,9 @@ public class DegreesWithExceptionITCase {
 			graph.getDegrees().output(new DiscardingOutputFormat<Tuple2<Long, Long>>());
 			env.execute();
 
-			fail("graph.getDegrees() did not throw NoSuchElementException");
+			fail("graph.getDegrees() did not fail.");
 		} catch (Exception e) {
-			assertTrue("Root exception has to be of type ProgramInvocationException.", e instanceof
ProgramInvocationException);
-			assertTrue("ProgramInvocationException's cause has to be of type JobExecutionException.",
e.getCause() instanceof JobExecutionException);
-			assertTrue("JobExecutionException's cause has to be of type NoSuchElementException.",
e.getCause().getCause() instanceof NoSuchElementException);
+			// We expect the job to fail with an exception
 		}
 	}
 }


Mime
View raw message