sjwiesman commented on a change in pull request #15858: URL: https://github.com/apache/flink/pull/15858#discussion_r629482995
########## File path: flink-libraries/flink-state-processing-api/src/test/java/org/apache/flink/state/api/utils/SavepointTestBase.java ########## @@ -56,16 +64,33 @@ try { JobID jobID = client.submitJob(jobGraph).get(); - return CompletableFuture.runAsync(waitingFunction::await) - .thenCompose(ignore -> triggerSavepoint(client, jobID)) - .get(5, TimeUnit.MINUTES); + waitForAllRunningOrSomeTerminal(jobID); + + return triggerSavepoint(client, jobID).get(5, TimeUnit.MINUTES); } catch (Exception e) { throw new RuntimeException("Failed to take savepoint", e); } finally { client.cancel(jobId); } } + private void waitForAllRunningOrSomeTerminal(JobID jobID) throws Exception { + while (true) { Review comment: Should this have some sort of timeout? Or are we happy to let the CI kill the process after some time? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org