Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/6283#discussion_r202298725 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java --- @@ -357,6 +362,42 @@ public void testRestoringFromSavepoint() throws Exception { } } + /** + * Tests that in a streaming use case where checkpointing is enabled, a + * fixed delay with Integer.MAX_VALUE retries is instantiated if no other restart + * strategy has been specified. + */ + @Test + public void testAutomaticRestartingWhenCheckpointing() throws Exception { + // create savepoint data + final long savepointId = 42L; + final File savepointFile = createSavepoint(savepointId); + + // set savepoint settings + final SavepointRestoreSettings savepointRestoreSettings = SavepointRestoreSettings.forPath( + savepointFile.getAbsolutePath(), + true); + final JobGraph jobGraph = createJobGraphWithCheckpointing(savepointRestoreSettings); + + final StandaloneCompletedCheckpointStore completedCheckpointStore = new StandaloneCompletedCheckpointStore(1); + final TestingCheckpointRecoveryFactory testingCheckpointRecoveryFactory = new TestingCheckpointRecoveryFactory( + completedCheckpointStore, + new StandaloneCheckpointIDCounter()); + haServices.setCheckpointRecoveryFactory(testingCheckpointRecoveryFactory); + final JobMaster jobMaster = createJobMaster( + new Configuration(), + jobGraph, + haServices, + new TestingJobManagerSharedServicesBuilder().build()); --- End diff -- Changing this line into ``` new TestingJobManagerSharedServicesBuilder() .setRestartStrategyFactory(RestartStrategyFactory.createRestartStrategyFactory(configuration)) .build() ``` Will make the test fail.
---