flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-clients/src/test/java/org/apache/flink/client/CliFrontendSavepointTest.java
/**
	 * Tests that a CLI call with a custom savepoint directory target is
	 * forwarded correctly to the cluster client.
	 */
Tests that a CLI call with a custom savepoint directory target is
forwarded correctly to the cluster client.
Tests that a CLI call with a custom savepoint directory target is forwarded correctly to the cluster client .
@Test
	public void testTriggerSavepointCustomTarget() throws Exception {
		replaceStdOutAndStdErr();
		try {
			JobID jobId = new JobID();
			String savepointDirectory = "customTargetDirectory";
			MockedCliFrontend frontend = new SavepointTestCliFrontend(savepointDirectory);
			String[] parameters = { jobId.toString(), savepointDirectory };
			int returnCode = frontend.savepoint(parameters);
			assertEquals(0, returnCode);
			verify(frontend.client, times(1))
				.triggerSavepoint(eq(jobId), eq(savepointDirectory));
			assertTrue(buffer.toString().contains(savepointDirectory));
		}
		finally {
			restoreStdOutAndStdErr();
		}
	}
@ Test public void testTriggerSavepointCustomTarget ( ) throws Exception { replaceStdOutAndStdErr ( ) ; try { JobID jobId = new JobID ( ) ; String savepointDirectory = "customTargetDirectory" ; MockedCliFrontend frontend = new SavepointTestCliFrontend ( savepointDirectory ) ; String [ ] parameters = { jobId . toString ( ) , savepointDirectory } ; int returnCode = frontend . savepoint ( parameters ) ; assertEquals ( 0 , returnCode ) ; verify ( frontend . client , times ( 1 ) ) . triggerSavepoint ( eq ( jobId ) , eq ( savepointDirectory ) ) ; assertTrue ( buffer . toString ( ) . contains ( savepointDirectory ) ) ; } finally { restoreStdOutAndStdErr ( ) ; } }
Tests that a CLI call with a custom savepoint directory target is
 forwarded correctly to the cluster client.
Tests that a CLI call with a custom savepoint directory target is forwarded correctly to the cluster client .