This is an automated email from the ASF dual-hosted git repository.

roman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 0516262  [hotfix][tests] Remove Deadlines from CommonTestUtils added 
in new methods
0516262 is described below

commit 05162625b75db9ea7ea9908da7e9fd349e549f16
Author: Roman Khachatryan <[email protected]>
AuthorDate: Wed Mar 30 09:02:42 2022 +0200

    [hotfix][tests] Remove Deadlines from CommonTestUtils added in new methods
---
 .../java/org/apache/flink/runtime/testutils/CommonTestUtils.java   | 5 ++---
 .../org/apache/flink/test/state/ChangelogCompatibilityITCase.java  | 7 +------
 .../java/org/apache/flink/test/state/ChangelogRescalingITCase.java | 3 +--
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/CommonTestUtils.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/CommonTestUtils.java
index 7a4a80f..7292b54 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/CommonTestUtils.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/CommonTestUtils.java
@@ -310,7 +310,7 @@ public class CommonTestUtils {
     }
 
     /** Wait for at least one successful checkpoint. */
-    public static void waitForCheckpoint(JobID jobID, MiniCluster miniCluster, 
Deadline timeout)
+    public static void waitForCheckpoint(JobID jobID, MiniCluster miniCluster)
             throws Exception, FlinkJobNotFoundException {
         waitUntilCondition(
                 () ->
@@ -320,8 +320,7 @@ public class CommonTestUtils {
                                                 .get()
                                                 .getCheckpointStatsSnapshot())
                                 .filter(st -> 
st.getCounts().getNumberOfCompletedCheckpoints() > 0)
-                                .isPresent(),
-                timeout);
+                                .isPresent());
     }
 
     /**
diff --git 
a/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogCompatibilityITCase.java
 
b/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogCompatibilityITCase.java
index ef4052c..6dc4606 100644
--- 
a/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogCompatibilityITCase.java
+++ 
b/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogCompatibilityITCase.java
@@ -18,7 +18,6 @@
 package org.apache.flink.test.state;
 
 import org.apache.flink.api.common.functions.ReduceFunction;
-import org.apache.flink.api.common.time.Deadline;
 import org.apache.flink.changelog.fs.FsStateChangelogStorageFactory;
 import org.apache.flink.client.program.ClusterClient;
 import org.apache.flink.configuration.Configuration;
@@ -39,7 +38,6 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 import java.io.File;
-import java.time.Duration;
 import java.util.Arrays;
 import java.util.List;
 import java.util.NoSuchElementException;
@@ -145,10 +143,7 @@ public class ChangelogCompatibilityITCase {
         ClusterClient<?> client = miniClusterResource.getClusterClient();
         submit(jobGraph, client);
         if (testCase.restoreSource == RestoreSource.CHECKPOINT) {
-            waitForCheckpoint(
-                    jobGraph.getJobID(),
-                    miniClusterResource.getMiniCluster(),
-                    Deadline.fromNow(Duration.ofMinutes(5)));
+            waitForCheckpoint(jobGraph.getJobID(), 
miniClusterResource.getMiniCluster());
             client.cancel(jobGraph.getJobID()).get();
             // obtain the latest checkpoint *after* cancellation - that one 
won't be subsumed
             return CommonTestUtils.getLatestCompletedCheckpointPath(
diff --git 
a/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogRescalingITCase.java
 
b/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogRescalingITCase.java
index b3f7004..0ad238b 100644
--- 
a/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogRescalingITCase.java
+++ 
b/flink-tests/src/test/java/org/apache/flink/test/state/ChangelogRescalingITCase.java
@@ -20,7 +20,6 @@ package org.apache.flink.test.state;
 
 import org.apache.flink.api.common.JobID;
 import org.apache.flink.api.common.eventtime.WatermarkStrategy;
-import org.apache.flink.api.common.time.Deadline;
 import org.apache.flink.api.connector.source.ReaderOutput;
 import org.apache.flink.api.connector.source.SourceReader;
 import org.apache.flink.api.connector.source.SourceReaderContext;
@@ -327,7 +326,7 @@ public class ChangelogRescalingITCase extends TestLogger {
     }
 
     private String checkpointAndCancel(JobID jobID) throws Exception {
-        waitForCheckpoint(jobID, cluster.getMiniCluster(), 
Deadline.fromNow(Duration.ofMinutes(5)));
+        waitForCheckpoint(jobID, cluster.getMiniCluster());
         cluster.getClusterClient().cancel(jobID).get();
         checkStatus(jobID);
         return CommonTestUtils.getLatestCompletedCheckpointPath(jobID, 
cluster.getMiniCluster())

Reply via email to