Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5308#discussion_r163877367
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobManagerRunnerMockTest.java
 ---
    @@ -250,19 +255,15 @@ public void testRegainLeadership() throws Exception {
                private volatile boolean finishedByOther;
     
                @Override
    -           public void jobFinished(JobResult result) {
    +           public void 
jobReachedGloballyTerminalState(ArchivedExecutionGraph executionGraph) {
                        checkArgument(!isJobFinished(), "job finished already");
                        checkArgument(!isJobFailed(), "job failed already");
     
    -                   this.result = result;
    -           }
    -
    -           @Override
    -           public void jobFailed(JobResult result) {
    -                   checkArgument(!isJobFinished(), "job finished already");
    -                   checkArgument(!isJobFailed(), "job failed already");
    +                   this.result = JobResult.createFrom(executionGraph);
     
    -                   this.failedCause = 
result.getSerializedThrowable().get();
    +                   if (!result.isSuccess()) {
    --- End diff --
    
    Good idea. I'll leave it like it is though, because this test will be 
removed in one of my other PRs.


---

Reply via email to