You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by pn...@apache.org on 2022/06/16 13:12:53 UTC

[flink] branch release-1.15 updated: [FLINK-26993][tests] Wait until checkpoint was actually triggered

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

pnowojski pushed a commit to branch release-1.15
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.15 by this push:
     new 3e86cf24fbc [FLINK-26993][tests] Wait until checkpoint was actually triggered
3e86cf24fbc is described below

commit 3e86cf24fbc430f49692c94cb12df781b2fe82c5
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Apr 7 15:25:11 2022 +0200

    [FLINK-26993][tests] Wait until checkpoint was actually triggered
    
    (cherry picked from commit a9a7d22b74479510a21cb2237def32c17a1980f0)
---
 .../flink/runtime/checkpoint/CheckpointCoordinatorTest.java      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
index 9d3a87ddd84..a34e7ce4f8d 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
@@ -389,8 +389,13 @@ public class CheckpointCoordinatorTest extends TestLogger {
             coordinator.triggerCheckpoint(
                     true); // enqueue and later see if it gets executed in the middle of
             // receiveAcknowledgeMessage
-            while (coordinator.getNumberOfPendingCheckpoints()
-                    == 0) { // wait for at least 1 request to be fully processed
+            while (coordinator.getPendingCheckpoints().values().stream()
+                    .noneMatch(pc -> pc.getCheckpointStorageLocation() != null)) {
+                // wait for at least 1 request to be fully processed
+                // explicitly check for the checkpoint storage location to make sure
+                // that the checkpoint was actually triggered
+                // if the checkpoint wasn't triggered yet the acknowledge below
+                // will fail with an error
                 Thread.sleep(10);
             }
             coordinator.receiveAcknowledgeMessage(