RocMarshal commented on code in PR #28423:
URL: https://github.com/apache/flink/pull/28423#discussion_r3408351450
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/slowtaskdetector/ExecutionTimeBasedSlowTaskDetectorTest.java:
##########
@@ -444,19 +452,22 @@ private ExecutionGraph createExecutionGraph(JobVertex...
jobVertices) throws Exc
return executionGraph;
}
- private ExecutionGraph createDynamicExecutionGraph(JobVertex...
jobVertices) throws Exception {
+ private ExecutionGraph createDynamicExecutionGraphAndSyncInitVerticesInit(
+ JobVertex... jobVertices) throws Exception {
final JobGraph jobGraph = JobGraphTestUtils.batchJobGraph(jobVertices);
final SchedulerBase scheduler =
new DefaultSchedulerBuilder(
- jobGraph,
-
ComponentMainThreadExecutorServiceAdapter.forMainThread(),
- EXECUTOR_RESOURCE.getExecutor())
+ jobGraph, mainThreadExecutor,
EXECUTOR_EXTENSION.getExecutor())
.buildAdaptiveBatchJobScheduler();
final ExecutionGraph executionGraph = scheduler.getExecutionGraph();
scheduler.startScheduling();
+
+ waitUntilCondition(() -> executionGraph.getState() ==
JobStatus.RUNNING, 10, 100);
+ Thread.sleep(20L); // Wait for additional time span to be stable.
Review Comment:
a not good action for a potential condition need to process in a short
time(wait for 20 millis).
I'd like to hear more ideas to resove it.
Thanks
--
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]