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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to