Source:
public void testCreatedSlotRequests() { final ExecutionVertexID executionVertexId = new ExecutionVertexID(new JobVertexID(), 0); final AllocationID allocationId = new AllocationID(); final SlotSharingGroupId sharingGroupId = new SlotSharingGroupId(); final ResourceProfile taskResourceProfile = ResourceProfile.fromResources(0.5, 250); final ResourceProfile physicalSlotResourceProfile = ResourceProfile.fromResources(1.0, 300); final TaskManagerLocation taskManagerLocation = new LocalTaskManagerLocation(); final TestingStateLocationRetriever stateLocationRetriever = new TestingStateLocationRetriever(); stateLocationRetriever.setStateLocation(executionVertexId, taskManagerLocation); final ExecutionSlotAllocator executionSlotAllocator = createExecutionSlotAllocator( stateLocationRetriever, new TestingInputsLocationsRetriever.Builder().build()); final List<ExecutionVertexSchedulingRequirements> schedulingRequirements = Arrays.asList( new ExecutionVertexSchedulingRequirements.Builder() .withExecutionVertexId(executionVertexId) .withPreviousAllocationId(allocationId) .withSlotSharingGroupId(sharingGroupId) .withPhysicalSlotResourceProfile(physicalSlotResourceProfile) .withTaskResourceProfile(taskResourceProfile) .build() ); executionSlotAllocator.allocateSlotsFor(schedulingRequirements); assertThat(slotProvider.getSlotRequests(), hasSize(1)); final SlotProfile requestSlotProfile = slotProvider.getSlotRequests().iterator().next().getSlotProfile(); assertThat(requestSlotProfile.getPreferredAllocations(), contains(allocationId)); assertThat(requestSlotProfile.getPreviousExecutionGraphAllocations(), contains(allocationId)); assertThat(requestSlotProfile.getTaskResourceProfile(), equalTo(taskResourceProfile)); assertThat(requestSlotProfile.getPreferredLocations(), contains(taskManagerLocation)); assertThat(requestSlotProfile.getPhysicalSlotResourceProfile(), equalTo(taskResourceProfile)); }

Target:
public void testCreatedSlotRequests() { final ExecutionVertexID executionVertexId = new ExecutionVertexID(new JobVertexID(), 0); final AllocationID allocationId = new AllocationID(); final SlotSharingGroupId sharingGroupId = new SlotSharingGroupId(); final ResourceProfile taskResourceProfile = ResourceProfile.fromResources(0.5, 250); final ResourceProfile physicalSlotResourceProfile = ResourceProfile.fromResources(1.0, 300); final TaskManagerLocation taskManagerLocation = new LocalTaskManagerLocation(); final TestingStateLocationRetriever stateLocationRetriever = new TestingStateLocationRetriever(); stateLocationRetriever.setStateLocation(executionVertexId, taskManagerLocation); final ExecutionSlotAllocator executionSlotAllocator = createExecutionSlotAllocator( stateLocationRetriever, new TestingInputsLocationsRetriever.Builder().build()); final List<ExecutionVertexSchedulingRequirements> schedulingRequirements = Collections.singletonList( new ExecutionVertexSchedulingRequirements.Builder() .withExecutionVertexId(executionVertexId) .withPreviousAllocationId(allocationId) .withSlotSharingGroupId(sharingGroupId) .withPhysicalSlotResourceProfile(physicalSlotResourceProfile) .withTaskResourceProfile(taskResourceProfile) .build() ); executionSlotAllocator.allocateSlotsFor(schedulingRequirements); assertThat(slotProvider.getSlotRequests(), hasSize(1)); final SlotProfile requestSlotProfile = slotProvider.getSlotRequests().iterator().next().getSlotProfile(); assertThat(requestSlotProfile.getPreferredAllocations(), contains(allocationId)); assertThat(requestSlotProfile.getPreviousExecutionGraphAllocations(), contains(allocationId)); assertThat(requestSlotProfile.getTaskResourceProfile(), equalTo(taskResourceProfile)); assertThat(requestSlotProfile.getPreferredLocations(), contains(taskManagerLocation)); assertThat(requestSlotProfile.getPhysicalSlotResourceProfile(), equalTo(taskResourceProfile)); }