zentol commented on a change in pull request #18761:
URL: https://github.com/apache/flink/pull/18761#discussion_r805965319



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/CreatingExecutionGraphTest.java
##########
@@ -149,9 +159,27 @@ public void 
testSuccessfulSlotAssignmentTransitionsToExecuting() throws Exceptio
                     actualExecutionGraph ->
                             assertThat(actualExecutionGraph, 
sameInstance(executionGraph)));
 
-            executionGraphWithvertexParallelismFuture.complete(
+            final AtomicReference<Throwable> handledFailureRef = new 
AtomicReference<>();
+            context.setCreateExecutingStateFunction(
+                    () ->
+                            new AdaptiveSchedulerTest.DummyState() {
+
+                                @Override
+                                public void handleGlobalFailure(Throwable 
cause) {
+                                    handledFailureRef.set(cause);
+                                }
+                            });
+
+            executionGraphWithVertexParallelismFuture.complete(
                     
CreatingExecutionGraph.ExecutionGraphWithVertexParallelism.create(
                             executionGraph, new TestingVertexParallelism()));
+
+            final Throwable t = new RuntimeException("Test.");
+            errorHandlerRef.get().accept(t);

Review comment:
       This should be a separate test case. It now contains more lines for the 
error handling although that's not it's primary purpose.




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