flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/PendingCheckpointTest.java
/**
	 * Tests that the persist checkpoint property is respected by the pending
	 * checkpoint when finalizing.
	 */
Tests that the persist checkpoint property is respected by the pending
checkpoint when finalizing.
Tests that the persist checkpoint property is respected by the pending checkpoint when finalizing .
@Test
	public void testPersistExternally() throws Exception {
		File tmp = tmpFolder.newFolder();
		CheckpointProperties persisted = new CheckpointProperties(false, true, false, false, false, false, false, false);
		PendingCheckpoint pending = createPendingCheckpoint(persisted, tmp.getAbsolutePath());
		pending.acknowledgeTask(ATTEMPT_ID, null, new CheckpointMetrics());
		assertEquals(0, tmp.listFiles().length);
		pending.finalizeCheckpointExternalized();
		assertEquals(1, tmp.listFiles().length);
		CheckpointProperties ephemeral = new CheckpointProperties(false, false, false, true, true, true, true, true);
		pending = createPendingCheckpoint(ephemeral, null);
		pending.acknowledgeTask(ATTEMPT_ID, null, new CheckpointMetrics());
		assertEquals(1, tmp.listFiles().length);
		pending.finalizeCheckpointNonExternalized();
		assertEquals(1, tmp.listFiles().length);
	}
@ Test public void testPersistExternally ( ) throws Exception { File tmp = tmpFolder . newFolder ( ) ; CheckpointProperties persisted = new CheckpointProperties ( false , true , false , false , false , false , false , false ) ; PendingCheckpoint pending = createPendingCheckpoint ( persisted , tmp . getAbsolutePath ( ) ) ; pending . acknowledgeTask ( ATTEMPT_ID , null , new CheckpointMetrics ( ) ) ; assertEquals ( 0 , tmp . listFiles ( ) . length ) ; pending . finalizeCheckpointExternalized ( ) ; assertEquals ( 1 , tmp . listFiles ( ) . length ) ; CheckpointProperties ephemeral = new CheckpointProperties ( false , false , false , true , true , true , true , true ) ; pending = createPendingCheckpoint ( ephemeral , null ) ; pending . acknowledgeTask ( ATTEMPT_ID , null , new CheckpointMetrics ( ) ) ; assertEquals ( 1 , tmp . listFiles ( ) . length ) ; pending . finalizeCheckpointNonExternalized ( ) ; assertEquals ( 1 , tmp . listFiles ( ) . length ) ; }
Tests that the persist checkpoint property is respected by the pending
 checkpoint when finalizing.
Tests that the persist checkpoint property is respected by the pending checkpoint when finalizing .
// Persisted checkpoint // Ephemeral checkpoint