[
https://issues.apache.org/jira/browse/FLINK-8778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378327#comment-16378327
]
ASF GitHub Bot commented on FLINK-8778:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5579#discussion_r170864686
--- Diff:
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/AbstractQueryableStateTestBase.java
---
@@ -425,18 +388,22 @@ public Integer getKey(Tuple2<Integer, Long> value) {
}
}).asQueryableState("hakuna", valueState);
- try (AutoCancellableJob closableJobGraph = new
AutoCancellableJob(cluster, env, deadline)) {
+ try (AutoCancellableJob closableJobGraph = new
AutoCancellableJob(clusterClient, env)) {
+
+ clusterClient.submitJob(
+ closableJobGraph.getJobGraph(),
AbstractQueryableStateTestBase.class.getClassLoader());
+
- // register to be notified when the job is running.
-
CompletableFuture<TestingJobManagerMessages.JobStatusIs> runningFuture =
-
notifyWhenJobStatusIs(closableJobGraph.getJobId(), JobStatus.RUNNING, deadline);
+ CompletableFuture<JobStatus> jobStatusFuture =
+
clusterClient.getJobStatus(closableJobGraph.getJobId());
-
cluster.submitJobDetached(closableJobGraph.getJobGraph());
+ while (deadline.hasTimeLeft() &&
!jobStatusFuture.get(deadline.timeLeft().toMillis(),
TimeUnit.MILLISECONDS).equals(JobStatus.RUNNING)) {
--- End diff --
Why do we have to do something like this? Wouldn't it be better to handle
rather the case where you do a QS request and handle the failure if the cluster
is not yet running?
> Migrate queryable state ITCases to use MiniClusterResource
> ----------------------------------------------------------
>
> Key: FLINK-8778
> URL: https://issues.apache.org/jira/browse/FLINK-8778
> Project: Flink
> Issue Type: Sub-task
> Components: Tests
> Reporter: Aljoscha Krettek
> Assignee: Aljoscha Krettek
> Priority: Blocker
> Fix For: 1.5.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)