use of org.apache.flink.runtime.jobmaster.TestingJobManagerRunner in project flink by apache.
the class MiniDispatcherTest method testTerminationAfterJobCompletion.
/**
* Tests that in detached mode, the {@link MiniDispatcher} will complete the future that signals
* job termination.
*/
@Test
public void testTerminationAfterJobCompletion() throws Exception {
final MiniDispatcher miniDispatcher = createMiniDispatcher(ClusterEntrypoint.ExecutionMode.DETACHED);
miniDispatcher.start();
try {
// wait until we have submitted the job
final TestingJobManagerRunner testingJobManagerRunner = testingJobManagerRunnerFactory.takeCreatedJobManagerRunner();
testingJobManagerRunner.completeResultFuture(executionGraphInfo);
// wait until we terminate
miniDispatcher.getShutDownFuture().get();
} finally {
RpcUtils.terminateRpcEndpoint(miniDispatcher, timeout);
}
}
use of org.apache.flink.runtime.jobmaster.TestingJobManagerRunner in project flink by apache.
the class TestingJobManagerRunnerFactory method offerTestingJobManagerRunner.
protected TestingJobManagerRunner offerTestingJobManagerRunner(JobID jobId) {
final TestingJobManagerRunner testingJobManagerRunner = createTestingJobManagerRunner(jobId);
Preconditions.checkState(createdJobManagerRunner.offer(testingJobManagerRunner), "Unable to persist created the new runner.");
return testingJobManagerRunner;
}
Aggregations