StefanRRichter commented on a change in pull request #7813: [FLINK-10712]
Support to restore state when using RestartPipelinedRegionStrategy
URL: https://github.com/apache/flink/pull/7813#discussion_r259837791
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FailoverRegionTest.java
##########
@@ -382,9 +457,34 @@ public void testFailWhileRestarting() throws Exception {
ev1.getCurrentExecutionAttempt().fail(new Exception("new
fail"));
assertEquals(JobStatus.CANCELLING,
strategy.getFailoverRegion(ev1).getState());
+ verify(spyCheckpointCoordinator,
times(1)).startCheckpointScheduler();
+ verify(spyCheckpointCoordinator,
times(2)).stopCheckpointScheduler();
+ verify(spyCheckpointCoordinator, times(1))
+
.restoreLatestCheckpointedState(ArgumentMatchers.anyMap(), any(Boolean.class),
any(Boolean.class));
+
+ ExecutionVertex ev2 = iter.next();
+ ev2.getCurrentExecutionAttempt().fail(new Exception("new
fail"));
+ assertEquals(JobStatus.RUNNING, eg.getState());
+ assertEquals(JobStatus.CANCELLING,
strategy.getFailoverRegion(ev1).getState());
+ for (ExecutionVertex evs : eg.getAllExecutionVertices()) {
+ evs.getCurrentExecutionAttempt().completeCancelling();
+ }
+ verify(spyCheckpointCoordinator,
times(2)).startCheckpointScheduler();
+ verify(spyCheckpointCoordinator,
times(4)).stopCheckpointScheduler();
+ verify(spyCheckpointCoordinator, times(2))
+
.restoreLatestCheckpointedState(ArgumentMatchers.anyMap(), any(Boolean.class),
any(Boolean.class));
+
}
- private static ExecutionGraph
createSingleRegionExecutionGraph(RestartStrategy restartStrategy) throws
Exception {
+ private ExecutionGraph createSingleRegionExecutionGraph(RestartStrategy
restartStrategy) throws Exception {
+ Instance instance = ExecutionGraphTestUtils.getInstance(
Review comment:
The changes from here until line `487` seem like they have no effect on the
test and should be reverted.
----------------------------------------------------------------
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