AHeise commented on a change in pull request #13604: URL: https://github.com/apache/flink/pull/13604#discussion_r504914106
########## File path: flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java ########## @@ -102,6 +116,24 @@ private static void verifyJvmOptions() { + "m", heap > MINIMUM_HEAP_SIZE_MB - 50); } + public static void waitForAllTaskRunning(MiniClusterResource miniCluster, JobID jobID, Deadline deadline) throws Exception { + try (final RestClusterClient<?> clusterClient = new RestClusterClient<Object>( + miniCluster.getClientConfiguration(), + StandaloneClusterId.getInstance())) { + JobMessageParameters params = new JobMessageParameters(); + params.jobPathParameter.resolve(jobID); + org.apache.flink.runtime.testutils.CommonTestUtils.waitUntilCondition(() -> { + final JobDetailsInfo jobDetailsInfo = clusterClient.sendRequest( + JobDetailsHeaders.getInstance(), + params, + EmptyRequestBody.getInstance()).get(); + return jobDetailsInfo.getJobStatus() == JobStatus.RUNNING && + jobDetailsInfo.getJobVerticesPerState().get(ExecutionState.RUNNING) == + jobDetailsInfo.getJobVertexInfos().size(); + }, deadline, 500); + } + } + Review comment: Hm Till actually proposed to use rest client, but I can't really see why your version wouldn't work. ---------------------------------------------------------------- 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