XComp commented on code in PR #19957:
URL: https://github.com/apache/flink/pull/19957#discussion_r896935595
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveSchedulerTest.java:
##########
@@ -1106,17 +1079,8 @@ private Iterable<RootExceptionHistoryEntry>
runExceptionHistoryTests(
singleThreadMainThreadExecutor);
runTestLogicFuture.get();
- Consumer<ExecutionAttemptID> canceller =
- attemptId ->
- scheduler.updateTaskExecutionState(
- new TaskExecutionStateTransition(
- new TaskExecutionState(
- attemptId,
ExecutionState.CANCELED, null)));
- CompletableFuture<Void> cancelFuture =
- CompletableFuture.runAsync(
- () -> cancelledTasks.forEach(canceller),
singleThreadMainThreadExecutor);
- cancelFuture.get();
- listener.waitForTerminal();
+ singleThreadMainThreadExecutor.execute(() -> scheduler.cancel());
Review Comment:
```suggestion
singleThreadMainThreadExecutor.execute(scheduler::cancel);
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]