tillrohrmann commented on a change in pull request #7568: [FLINK-11417] Make
access to ExecutionGraph single threaded from JobMaster main thread
URL: https://github.com/apache/flink/pull/7568#discussion_r252249882
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
##########
@@ -512,31 +584,38 @@ public void testSuspendWhileRestarting() throws
Exception {
controllableRestartStrategy,
scheduler);
-
eg.attachJobGraph(jobGraph.getVerticesSortedTopologicallyFromSources());
+ eg.start(testMainThread.getMainThreadExecutor());
- assertEquals(JobStatus.CREATED, eg.getState());
+ testMainThread.execute(() -> {
+
eg.attachJobGraph(jobGraph.getVerticesSortedTopologicallyFromSources());
- eg.scheduleForExecution();
+ assertEquals(JobStatus.CREATED, eg.getState());
- assertEquals(JobStatus.RUNNING, eg.getState());
+ eg.scheduleForExecution();
+ assertEquals(JobStatus.RUNNING, eg.getState());
+ });
- instance.markDead();
+ testMainThread.execute(instance::markDead);
controllableRestartStrategy.getReachedCanRestart().await(timeout.toMilliseconds(),
TimeUnit.MILLISECONDS);
- assertEquals(JobStatus.RESTARTING, eg.getState());
+ testMainThread.getMainThreadExecutor().execute(() -> {
- eg.suspend(new Exception("Test exception"));
+ assertEquals(JobStatus.RESTARTING, eg.getState());
- assertEquals(JobStatus.SUSPENDED, eg.getState());
+ eg.suspend(new Exception("Test exception"));
+ assertEquals(JobStatus.SUSPENDED, eg.getState());
+ });
controllableRestartStrategy.unlockRestart();
-
controllableRestartStrategy.getRestartDone().await(timeout.toMilliseconds(),
TimeUnit.MILLISECONDS);
- assertEquals(JobStatus.SUSPENDED, eg.getState());
+ testMainThread.execute(() -> {
+ assertEquals(JobStatus.SUSPENDED, eg.getState());
+ });
}
+ @Ignore
@Test
public void testConcurrentLocalFailAndRestart() throws Exception {
Review comment:
I think this test could be changed to test that multiple
`Execution#failAsync` calls will leave the EG in the `FAILING` state meaning
that they don't interfere with each other (given that this is nowhere else
tested so far). The concurrent aspect should be removed though.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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