You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/10/07 20:59:50 UTC

[GitHub] [beam] ibzib commented on a change in pull request #15664: [BEAM-10955] Flink Java Runner test flake: Could not find Flink job

ibzib commented on a change in pull request #15664:
URL: https://github.com/apache/beam/pull/15664#discussion_r724526270



##########
File path: runners/flink/src/test/java/org/apache/beam/runners/flink/FlinkSavepointTest.java
##########
@@ -251,20 +253,29 @@ private JobID waitForJobToBeReady() throws InterruptedException, ExecutionExcept
     }
   }
 
-  private String takeSavepointAndCancelJob(JobID jobID) throws Exception {
+  private String takeSavepoint(JobID jobID) throws Exception {
     Exception exception = null;
     // try multiple times because the job might not be ready yet
     for (int i = 0; i < 10; i++) {
       try {
-        return flinkCluster.triggerSavepoint(jobID, null, true).get();
+        return flinkCluster.triggerSavepoint(jobID, null, false).get();
       } catch (Exception e) {
         exception = e;
+        LOG.debug("Exception while triggerSavepoint, trying again", e);
         Thread.sleep(100);
       }
     }
     throw exception;
   }
 
+  private Acknowledge cancelJob(JobID jobID) throws Exception {
+    try {
+      return flinkCluster.cancelJob(jobID).get();
+    } catch (Exception e) {
+      throw e;

Review comment:
       It looks like this try-catch block is unnecessary.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org