final ExecutionAttemptID id = (ExecutionAttemptID) invocation.getArguments()[0];
return new TaskOperationResult(id, true);
}
});
Scheduler scheduler = new Scheduler();
for (int i = 0; i < dop1 + dop2; i++) {
scheduler.newInstanceAvailable(getInstance(taskManager));
}
assertEquals(dop1 + dop2, scheduler.getNumberOfAvailableSlots());
// schedule, this triggers mock deployment
eg.scheduleForExecution(scheduler);
Map<ExecutionAttemptID, Execution> executions = eg.getRegisteredExecutions();