zhuzhurk commented on a change in pull request #11213: [FLINK-16276][tests]
Introduce a builder and factory methods to create DefaultScheduler for testing
URL: https://github.com/apache/flink/pull/11213#discussion_r385748972
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/SchedulerTestingUtils.java
##########
@@ -213,4 +267,158 @@ public static CheckpointCoordinator
getCheckpointCoordinator(SchedulerBase sched
return operatorGateway.sendOperatorEventToTask(task,
operator, evt);
}
}
+
+ /**
+ * Builder for {@link DefaultScheduler}.
+ */
+ public static class DefaultSchedulerBuilder {
+ private final JobGraph jobGraph;
+
+ private SchedulingStrategyFactory schedulingStrategyFactory;
+
+ private Logger log = LOG;
+ private BackPressureStatsTracker backPressureStatsTracker =
VoidBackPressureStatsTracker.INSTANCE;
+ private Executor ioExecutor =
java.util.concurrent.Executors.newSingleThreadExecutor();
+ private Configuration jobMasterConfiguration = new
Configuration();
+ private ScheduledExecutorService futureExecutor = new
DirectScheduledExecutorService();
+ private ScheduledExecutor delayExecutor = new
ScheduledExecutorServiceAdapter(futureExecutor);
+ private ClassLoader userCodeLoader =
getClass().getClassLoader();
Review comment:
Ok.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services