GJL commented on a change in pull request #9904: [FLINK-14232][runtime] Support 
global failure handling in NG scheduling
URL: https://github.com/apache/flink/pull/9904#discussion_r338023525
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandlerTest.java
 ##########
 @@ -167,23 +164,49 @@ public void testUnrecoverableErrorCheck() {
                        new Exception(new SuppressRestartsException(new 
Exception()))));
        }
 
+       @Test
+       public void testGlobalFailureHandling() {
+               final FailureHandlingResult result = 
executionFailureHandler.getGlobalFailureHandlingResult(
+                       new Exception("test failure"));
+
+               assertTrue(result.canRestart());
+               assertEquals(restartDelayMs, result.getRestartDelayMS());
+               assertEquals(
+                       
StreamSupport.stream(failoverTopology.getFailoverVertices().spliterator(), 
false)
+                       .map(FailoverVertex::getExecutionVertexID)
+                       .collect(Collectors.toSet()),
+                       result.getVerticesToRestart());
+               try {
 
 Review comment:
   I think it would be better not to test here that `result.getError()` throws 
an exception if `result.canRestart()` returns true. This is already covered by 
other tests. Imo there should be only one unit test asserting this behavior in 
`FailureHandlingResultTest`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to