@Override
    public void cancel(ExecutionAttemptID executionAttemptId) {
        cancelLogicalSlotRequest(executionAttemptId.getExecutionVertexId(), null);
    }
@Test
    void testLogicalSlotCancelsPhysicalSlotRequestAndRemovesSharedSlot() throws Exception {
        // physical slot request is not completed and does not complete logical requests
        testLogicalSlotRequestCancellationOrRelease(
                true,
                true,
                (context, assignment) -> {
                    context.getAllocator().cancel(assignment.getExecutionAttemptId());
                    assertThatThrownBy(
                                    () -> {
                                        context.getAllocator()
                                                .cancel(assignment.getExecutionAttemptId());
                                        assignment.getLogicalSlotFuture().get();
                                    })
                            .as("The logical future must finish with the cancellation exception.")
                            .hasCauseInstanceOf(CancellationException.class);
                });
    }