flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #5579: [FLINK-8778] Migrate queryable state ITCases to us...
Date Mon, 26 Feb 2018 12:21:15 GMT
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.


---

Mime
View raw message