Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/5579#discussion_r170573280
--- Diff:
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/AbstractQueryableStateTestBase.java
---
@@ -1307,24 +1268,13 @@ JobID getJobId() {
public void close() throws Exception {
// Free cluster resources
if (jobId != null) {
- cluster.getLeaderGateway(deadline.timeLeft())
- .ask(new
JobManagerMessages.CancelJob(jobId), deadline.timeLeft())
-
.mapTo(ClassTag$.MODULE$.<CancellationSuccess>apply(CancellationSuccess.class));
-
-
cancellationFuture.get(deadline.timeLeft().toMillis(), TimeUnit.MILLISECONDS);
+ clusterClient.cancel(jobId);
+ // cancel() is non-blocking so do this to make
sure the job finished
+ clusterClient.requestJobResult(jobId).get();
--- End diff --
add timeout. We should also check the returned status to make sure it is
actually finished.
---