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



##########
File path: 
flink-clients/src/test/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrapITCase.java
##########
@@ -165,6 +168,69 @@ public void 
testDispatcherRecoversAfterLosingAndRegainingLeadership() throws Exc
 
     @Test
     public void testDirtyJobResultRecoveryInApplicationMode() throws Exception 
{
+        // having a dirty entry in the JobResultStore should make the 
ApplicationDispatcherBootstrap
+        // implementation fail to submit the job
+        final JobResultStore jobResultStore = new EmbeddedJobResultStore();
+        jobResultStore.createDirtyResult(
+                new JobResultEntry(
+                        TestingJobResultStore.createSuccessfulJobResult(
+                                ApplicationDispatcherBootstrap.ZERO_JOB_ID)));
+
+        final CompletableFuture<Throwable> fatalError = new 
CompletableFuture<>();
+        testJobResultStoreEntryLeadingToDuplicateJobSubmissionException(
+                jobResultStore,
+                ErrorHandlingSubmissionJob.createPackagedProgram(),
+                fatalError::complete);
+
+        
FlinkAssertions.assertThatChainOfCauses(ErrorHandlingSubmissionJob.getSubmissionException())

Review comment:
       The fact that we have to rely on this singleton is a cause for concern. 
There should be a better way to retrieve the job result when using a mini 
cluster with application mode.




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