You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/20 16:43:55 UTC

[GitHub] [flink] dannycranmer commented on a diff in pull request #20186: [FLINK-28411] - Error Handling for OperatorCoordinatorHolder which may fail Session Cluster

dannycranmer commented on code in PR #20186:
URL: https://github.com/apache/flink/pull/20186#discussion_r925835278


##########
flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java:
##########
@@ -442,6 +442,25 @@ public void testCheckpointFailsIfSendingEventFailedBeforeTrigger() throws Except
         assertTrue(checkpointResult.isCompletedExceptionally());
     }
 
+    @Test
+    public void testFailJobWhenExceptionThrownFromStartingOperatorCoordinatorHolder()
+            throws Exception {
+        Function<OperatorCoordinator.Context, OperatorCoordinator> coordinatorProvider =
+                context ->
+                        new TestingOperatorCoordinator(context) {
+                            @Override
+                            public void start() {
+                                throw new RuntimeException("Artificial Exception");
+                            }
+                        };
+        final EventReceivingTasks tasks = EventReceivingTasks.createForRunningTasks();
+        final OperatorCoordinatorHolder holder =
+                createCoordinatorHolder(tasks, coordinatorProvider);
+
+        assertNotNull(globalFailure);

Review Comment:
   Can you add an assertion to check that the job is cancelled with the appropriate error?



##########
mvnvm.properties:
##########
@@ -0,0 +1 @@
+mvn_version=3.2.5

Review Comment:
   What is this for? This is an old maven version, looks like this is not intentional? 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org