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 that the externalized checkpoint settings are forwarded.
	 */
Tests that the externalized checkpoint settings are forwarded.
Tests that the externalized checkpoint settings are forwarded .
@Test
	public void testEnabledExternalizedCheckpointSettings() throws Exception {
		GraphAndSettings graphAndSettings = createGraphAndSettings(true, false);
		AccessExecutionGraph graph = graphAndSettings.graph;
		ExternalizedCheckpointSettings externalizedSettings = graphAndSettings.externalizedSettings;
		CheckpointConfigHandler handler = new CheckpointConfigHandler(mock(ExecutionGraphCache.class), Executors.directExecutor());
		String json = handler.handleRequest(graph, Collections.<String, String>emptyMap()).get();
		ObjectMapper mapper = new ObjectMapper();
		JsonNode externalizedNode = mapper.readTree(json).get("externalization");
		assertNotNull(externalizedNode);
		assertEquals(externalizedSettings.externalizeCheckpoints(), externalizedNode.get("enabled").asBoolean());
		assertEquals(externalizedSettings.deleteOnCancellation(), externalizedNode.get("delete_on_cancellation").asBoolean());
	}
@ Test public void testEnabledExternalizedCheckpointSettings ( ) throws Exception { GraphAndSettings graphAndSettings = createGraphAndSettings ( true , false ) ; AccessExecutionGraph graph = graphAndSettings . graph ; ExternalizedCheckpointSettings externalizedSettings = graphAndSettings . externalizedSettings ; CheckpointConfigHandler handler = new CheckpointConfigHandler ( mock ( ExecutionGraphCache . class ) , Executors . directExecutor ( ) ) ; String json = handler . handleRequest ( graph , Collections . < String , String > emptyMap ( ) ) . get ( ) ; ObjectMapper mapper = new ObjectMapper ( ) ; JsonNode externalizedNode = mapper . readTree ( json ) . get ( "externalization" ) ; assertNotNull ( externalizedNode ) ; assertEquals ( externalizedSettings . externalizeCheckpoints ( ) , externalizedNode . get ( "enabled" ) . asBoolean ( ) ) ; assertEquals ( externalizedSettings . deleteOnCancellation ( ) , externalizedNode . get ( "delete_on_cancellation" ) . asBoolean ( ) ) ; }
Tests that the externalized checkpoint settings are forwarded.
Tests that the externalized checkpoint settings are forwarded .