use of org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport in project flink by apache.
the class DefaultExecutionDeploymentReconcilerTest method testMissingDeployments.
@Test
public void testMissingDeployments() {
TestingExecutionDeploymentReconciliationHandler handler = new TestingExecutionDeploymentReconciliationHandler();
DefaultExecutionDeploymentReconciler reconciler = new DefaultExecutionDeploymentReconciler(handler);
ResourceID resourceId = generate();
ExecutionAttemptID attemptId = new ExecutionAttemptID();
reconciler.reconcileExecutionDeployments(resourceId, new ExecutionDeploymentReport(Collections.emptySet()), Collections.singletonMap(attemptId, ExecutionDeploymentState.DEPLOYED));
assertThat(handler.getUnknownExecutions(), empty());
assertThat(handler.getMissingExecutions(), hasItem(attemptId));
}
use of org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport in project flink by apache.
the class DefaultExecutionDeploymentReconcilerTest method testMatchingDeployments.
@Test
public void testMatchingDeployments() {
TestingExecutionDeploymentReconciliationHandler handler = new TestingExecutionDeploymentReconciliationHandler();
DefaultExecutionDeploymentReconciler reconciler = new DefaultExecutionDeploymentReconciler(handler);
ResourceID resourceId = generate();
ExecutionAttemptID attemptId = new ExecutionAttemptID();
reconciler.reconcileExecutionDeployments(resourceId, new ExecutionDeploymentReport(Collections.singleton(attemptId)), Collections.singletonMap(attemptId, ExecutionDeploymentState.DEPLOYED));
assertThat(handler.getMissingExecutions(), empty());
assertThat(handler.getUnknownExecutions(), empty());
}
Aggregations