azagrebin commented on a change in pull request #6567: [FLINK-10074] Allowable number of checkpoint failures URL: https://github.com/apache/flink/pull/6567#discussion_r214384046
########## File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/CheckpointExceptionHandlerConfigurationTest.java ########## @@ -75,6 +79,19 @@ public CheckpointExceptionHandler createCheckpointExceptionHandler( } }; + if (failOnException) { + CheckpointExceptionHandler exceptionHandler = + inspectingFactory.createCheckpointExceptionHandler(failOnException, environment); + Assert.assertTrue( + exceptionHandler instanceof CheckpointExceptionHandlerFactory.FailingCheckpointExceptionHandler + ); + + CheckpointExceptionHandlerFactory.FailingCheckpointExceptionHandler actuallyHandler = + (CheckpointExceptionHandlerFactory.FailingCheckpointExceptionHandler) exceptionHandler; + + Assert.assertEquals(3, actuallyHandler.tolerableNumber); Review comment: I would rather make fields of `FailingCheckpointExceptionHandler` private and check `tolerableNumber` the same way as `failTaskOnCheckpointException` in previous declaration of `CheckpointExceptionHandlerFactory` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services