zhuzhurk commented on a change in pull request #13321: URL: https://github.com/apache/flink/pull/13321#discussion_r485060703
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/AbstractExecutionSlotAllocatorTest.java ########## @@ -114,38 +118,30 @@ public void testCompletedExecutionVertexAssignmentWillBeUnregistered() { public void testComputeAllPriorAllocationIds() { final List<AllocationID> expectAllocationIds = Arrays.asList(new AllocationID(), new AllocationID()); final List<ExecutionVertexSchedulingRequirements> testSchedulingRequirements = Arrays.asList( - new ExecutionVertexSchedulingRequirements.Builder(). - withExecutionVertexId(new ExecutionVertexID(new JobVertexID(), 0)). - withPreviousAllocationId(expectAllocationIds.get(0)). - build(), - new ExecutionVertexSchedulingRequirements.Builder(). - withExecutionVertexId(new ExecutionVertexID(new JobVertexID(), 1)). - withPreviousAllocationId(expectAllocationIds.get(0)). - build(), - new ExecutionVertexSchedulingRequirements.Builder(). - withExecutionVertexId(new ExecutionVertexID(new JobVertexID(), 2)). - withPreviousAllocationId(expectAllocationIds.get(1)). - build(), - new ExecutionVertexSchedulingRequirements.Builder(). - withExecutionVertexId(new ExecutionVertexID(new JobVertexID(), 3)). - build() + createSchedulingRequirement(new ExecutionVertexID(new JobVertexID(), 0), expectAllocationIds.get(0)), + createSchedulingRequirement(new ExecutionVertexID(new JobVertexID(), 1), expectAllocationIds.get(0)), + createSchedulingRequirement(new ExecutionVertexID(new JobVertexID(), 2), expectAllocationIds.get(1)), + createSchedulingRequirement(new ExecutionVertexID(new JobVertexID(), 3)) ); final Set<AllocationID> allPriorAllocationIds = AbstractExecutionSlotAllocator.computeAllPriorAllocationIds(testSchedulingRequirements); assertThat(allPriorAllocationIds, containsInAnyOrder(expectAllocationIds.toArray())); } - private List<ExecutionVertexSchedulingRequirements> createSchedulingRequirements( - final ExecutionVertexID... executionVertexIds) { - - final List<ExecutionVertexSchedulingRequirements> schedulingRequirements = new ArrayList<>(executionVertexIds.length); + private ExecutionVertexSchedulingRequirements createSchedulingRequirement( + final ExecutionVertexID executionVertexId) { + return createSchedulingRequirement(executionVertexId, null); + } Review comment: done. ########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerTestBase.java ########## @@ -161,7 +161,7 @@ public TaskManagerLocation addTaskManager(int numberSlots) { public void releaseTaskManager(ResourceID resourceId) { try { - supplyInMainThreadExecutor(() -> slotPool.releaseTaskManager(resourceId, null)); + supplyInMainThreadExecutor(() -> slotPool.releaseTaskManager(resourceId, new Exception("Test Exception"))); Review comment: done. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org