GJL commented on a change in pull request #7676: [FLINK-11364][tests] Port TaskManagerFailsITCase to new code base URL: https://github.com/apache/flink/pull/7676#discussion_r255593757
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java ########## @@ -945,4 +954,12 @@ public void onFatalError(Throwable exception) { closeAsync(); } } + + private class TerminatingFatalErrorHandlerFactory { + + @GuardedBy("lock") + private TerminatingFatalErrorHandler create() { + return new TerminatingFatalErrorHandler(taskManagers.size()); Review comment: This deserves a comment. We pass `taskmanagers.size()` but the constructor expects an index. One might think that this throws `ArrayIndexOutOfBoundsException`. ``` synchronized (lock) { taskManagers.get(index).shutDown(); } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services