flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FailoverRegionTest.java
/**
	 * Tests that when a task fail, and restart strategy doesn't support restarting, the job will go to failed
	 * @throws Exception
	 */
Tests that when a task fail, and restart strategy doesn't support restarting, the job will go to failed
@throws Exception
Tests that when a task fail and restart strategy doesn ' t support restarting the job will go to failed @throws Exception
@Test
	public void testNoManualRestart() throws Exception {
		NoRestartStrategy restartStrategy = new NoRestartStrategy();
		ExecutionGraph eg = createSingleRegionExecutionGraph(restartStrategy);
		ExecutionVertex ev = eg.getAllExecutionVertices().iterator().next();
		ev.fail(new Exception("Test Exception"));
		for (ExecutionVertex evs : eg.getAllExecutionVertices()) {
			evs.getCurrentExecutionAttempt().cancelingComplete();
		}
		assertEquals(JobStatus.FAILED, eg.getState());
	}
@ Test public void testNoManualRestart ( ) throws Exception { NoRestartStrategy restartStrategy = new NoRestartStrategy ( ) ; ExecutionGraph eg = createSingleRegionExecutionGraph ( restartStrategy ) ; ExecutionVertex ev = eg . getAllExecutionVertices ( ) . iterator ( ) . next ( ) ; ev . fail ( new Exception ( "Test Exception" ) ) ; for ( ExecutionVertex evs : eg . getAllExecutionVertices ( ) ) { evs . getCurrentExecutionAttempt ( ) . cancelingComplete ( ) ; } assertEquals ( JobStatus . FAILED , eg . getState ( ) ) ; }
Tests that when a task fail, and restart strategy doesn't support restarting, the job will go to failed
 @throws Exception
Tests that when a task fail and restart strategy doesn ' t support restarting the job will go to failed @throws Exception