You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/04/07 13:25:22 UTC
[flink] branch master updated: [FLINK-26993][tests] Wait until checkpoint was actually triggered
This is an automated email from the ASF dual-hosted git repository.
chesnay 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 a9a7d22b744 [FLINK-26993][tests] Wait until checkpoint was actually triggered
a9a7d22b744 is described below
commit a9a7d22b74479510a21cb2237def32c17a1980f0
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Apr 7 15:25:11 2022 +0200
[FLINK-26993][tests] Wait until checkpoint was actually triggered
---
.../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 30af82fbe7d..7ecb235dd4a 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
@@ -388,8 +388,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(