dmvk commented on a change in pull request #17000: URL: https://github.com/apache/flink/pull/17000#discussion_r698687298
########## File path: flink-clients/src/test/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrapTest.java ########## @@ -779,6 +816,22 @@ public void testDuplicateJobSubmissionWithRunningJobId() throws Throwable { assertFalse(maybeDuplicate.get().isGloballyTerminated()); } + @Test + public void testClusterShutsDownGracefullyOnJobDriverError() throws Exception { + final MiniClusterConfiguration cfg = new MiniClusterConfiguration.Builder().build(); + try (final MiniCluster miniCluster = new ApplicationMiniCluster(cfg, getFailingProgram())) { + miniCluster.start(); + final CompletableFuture<ApplicationStatus> shutdownFuture = + Iterables.getOnlyElement(miniCluster.getDispatcherShutdownFutures()); + try { + shutdownFuture.get(); + fail("Exception expected."); + } catch (Exception e) { + assertThat(e, FlinkMatchers.containsCause(FailingJob.FailingJobException.class)); + } + } + } Review comment: 👍 Also I'll change the test to reflect described scenario (dispatcher loses leadership). -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org