Izeren commented on code in PR #27719:
URL: https://github.com/apache/flink/pull/27719#discussion_r2877329123


##########
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java:
##########
@@ -105,20 +111,24 @@ void testCancelAllPendingRequestWhileCanceling() throws 
Exception {
             JobGraph graph = JobGraphTestUtils.streamingJobGraph(sender);
             SchedulerBase scheduler =
                     new DefaultSchedulerBuilder(
-                                    graph, mainThreadExecutor, 
EXECUTOR_RESOURCE.getExecutor())
+                                    graph, mainThreadExecutor, 
EXECUTOR_EXTENSION.getExecutor())
                             .setExecutionSlotAllocatorFactory(
                                     
createExecutionSlotAllocatorFactory(slotPool))
                             .build();
-            ExecutionGraph executionGraph = scheduler.getExecutionGraph();
 
-            startScheduling(scheduler);
-            offerSlots(slotPool, NUM_TASKS);
+            mainThreadExecutor.execute(

Review Comment:
   In ExecutionGraphSuspendTest, I have used:
   ```
       private static void runInMainThread(final Runnable runnable) {
           CompletableFuture.runAsync(runnable, 
JM_MAIN_THREAD_EXECUTOR_RESOURCE.getExecutor()).join();
       }
   ```
   maybe it is worth creating Abstract test class for Restart/Suspend etc and 
create these executor extensions at higher level 🤔 



-- 
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]

Reply via email to