flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/checkpoints/CheckpointConfigHandlerTest.java
/**
	 * Tests the that the isExactlyOnce flag is respected.
	 */
Tests the that the isExactlyOnce flag is respected.
Tests the that the isExactlyOnce flag is respected .
@Test
	public void testAtLeastOnce() throws Exception {
		GraphAndSettings graphAndSettings = createGraphAndSettings(false, false);
		AccessExecutionGraph graph = graphAndSettings.graph;
		CheckpointConfigHandler handler = new CheckpointConfigHandler(mock(ExecutionGraphCache.class), Executors.directExecutor());
		String json = handler.handleRequest(graph, Collections.<String, String>emptyMap()).get();
		ObjectMapper mapper = new ObjectMapper();
		JsonNode rootNode = mapper.readTree(json);
		assertEquals("at_least_once", rootNode.get("mode").asText());
	}
@ Test public void testAtLeastOnce ( ) throws Exception { GraphAndSettings graphAndSettings = createGraphAndSettings ( false , false ) ; AccessExecutionGraph graph = graphAndSettings . graph ; CheckpointConfigHandler handler = new CheckpointConfigHandler ( mock ( ExecutionGraphCache . class ) , Executors . directExecutor ( ) ) ; String json = handler . handleRequest ( graph , Collections . < String , String > emptyMap ( ) ) . get ( ) ; ObjectMapper mapper = new ObjectMapper ( ) ; JsonNode rootNode = mapper . readTree ( json ) ; assertEquals ( "at_least_once" , rootNode . get ( "mode" ) . asText ( ) ) ; }
Tests the that the isExactlyOnce flag is respected.
Tests the that the isExactlyOnce flag is respected .