RocMarshal commented on code in PR #21999:
URL: https://github.com/apache/flink/pull/21999#discussion_r1115487606


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskITCase.java:
##########
@@ -110,6 +118,47 @@ public void testFailInEndOfConstructor() throws Exception {
                                 .build(EXECUTOR_RESOURCE.getExecutor()));
     }
 
+    @Test
+    public void 
streamTaskAsyncExceptionHandlerHandleExceptionInInitializingDuration()
+            throws Exception {
+        MockEnvironment mockEnvironment = MockEnvironment.builder().build();
+        RuntimeException expectedException = new RuntimeException("RUNTIME 
EXCEPTION");
+
+        
mockEnvironment.setExpectedExternalFailureCause(AsynchronousException.class);
+        final String expectedErrorMessage = "EXPECTED_ERROR MESSAGE";
+
+        NoOpStreamTask noOpStreamTask =
+                new NoOpStreamTask(mockEnvironment) {
+                    volatile boolean handledAsyncException = false;
+
+                    @Override
+                    protected void init() throws Exception {
+                        super.init();
+
+                        CompletableFuture.runAsync(

Review Comment:
   updated~.



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