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 pending checkpoints can be subsumed iff they are forced.
	 */
Tests that pending checkpoints can be subsumed iff they are forced.
Tests that pending checkpoints can be subsumed iff they are forced .
@Test
	public void testCanBeSubsumed() throws Exception {
		CheckpointProperties forced = new CheckpointProperties(true, true, false, false, false, false, false, false);
		PendingCheckpoint pending = createPendingCheckpoint(forced, "ignored");
		assertFalse(pending.canBeSubsumed());
		try {
			pending.abortSubsumed();
			fail("Did not throw expected Exception");
		} catch (IllegalStateException ignored) {
		}
		CheckpointProperties subsumed = new CheckpointProperties(false, true, false, false, false, false, false, false);
		pending = createPendingCheckpoint(subsumed, "ignored");
		assertTrue(pending.canBeSubsumed());
	}
@ Test public void testCanBeSubsumed ( ) throws Exception { CheckpointProperties forced = new CheckpointProperties ( true , true , false , false , false , false , false , false ) ; PendingCheckpoint pending = createPendingCheckpoint ( forced , "ignored" ) ; assertFalse ( pending . canBeSubsumed ( ) ) ; try { pending . abortSubsumed ( ) ; fail ( "Did not throw expected Exception" ) ; } catch ( IllegalStateException ignored ) { } CheckpointProperties subsumed = new CheckpointProperties ( false , true , false , false , false , false , false , false ) ; pending = createPendingCheckpoint ( subsumed , "ignored" ) ; assertTrue ( pending . canBeSubsumed ( ) ) ; }
Tests that pending checkpoints can be subsumed iff they are forced.
Tests that pending checkpoints can be subsumed iff they are forced .
// Forced checkpoints cannot be subsumed // Expected // Non-forced checkpoints can be subsumed