You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ma...@apache.org on 2026/10/06 15:54:48 UTC

(flink) branch master updated: [FLINK-40913][tests] Use a single vertex job in testStuckSyncPhaseFailsJob to avoid failures race

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

MartijnVisser 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 a87fa015b58 [FLINK-40913][tests] Use a single vertex job in testStuckSyncPhaseFailsJob to avoid failures race
a87fa015b58 is described below

commit a87fa015b586bd776a8b7397cf2c4eafcfd42666
Author: Efrat Levitan <el...@confluent.io>
AuthorDate: Tue Oct 6 15:47:49 2026 +0300

    [FLINK-40913][tests] Use a single vertex job in testStuckSyncPhaseFailsJob to avoid failures race
    
    With 2 tasks the test sometimes fail due to a different error message, for example: [ERROR] org.apache.flink.test.checkpointing.CheckpointSyncPhaseTimeoutITCase.testStuckSyncPhaseFailsJob(MiniCluster) -- Time elapsed: 3.902 s <<< FAILURE!
    org.opentest4j.AssertionFailedError:
    
    Expecting a root cause with message:
      Task Source: Custom Source (1/1)#0 did not complete the synchronous phase of checkpoint 1 within 50 ms.
    but message was:
      Task Sink: Writer (1/1)#0 did not complete the synchronous phase of checkpoint 1 within 50 ms.
    
    Co-generated-by: Claude Code (Claude Fable 5.1)
---
 .../flink/test/checkpointing/CheckpointSyncPhaseTimeoutITCase.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/CheckpointSyncPhaseTimeoutITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/CheckpointSyncPhaseTimeoutITCase.java
index 5b9a27d2be8..5722677b1c0 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/CheckpointSyncPhaseTimeoutITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/CheckpointSyncPhaseTimeoutITCase.java
@@ -26,7 +26,6 @@ import org.apache.flink.runtime.state.FunctionSnapshotContext;
 import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
 import org.apache.flink.streaming.api.checkpoint.CheckpointedFunction;
 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
-import org.apache.flink.streaming.api.functions.sink.v2.DiscardingSink;
 import org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator;
 import org.apache.flink.streaming.util.RestartStrategyUtils;
 import org.apache.flink.test.junit5.InjectMiniCluster;
@@ -68,7 +67,8 @@ class CheckpointSyncPhaseTimeoutITCase extends TestLogger {
 
     @Test
     void testStuckSyncPhaseFailsJob(@InjectMiniCluster MiniCluster miniCluster) throws Exception {
-        env.addSource(new BlockingSnapshotSource()).sinkTo(new DiscardingSink<>());
+        // A single vertex job for deterministic task name on the failure message:
+        env.addOperator(env.addSource(new BlockingSnapshotSource()).getTransformation());
         JobGraph jobGraph = StreamingJobGraphGenerator.createJobGraph(env.getStreamGraph());
 
         assertThatThrownBy(() -> miniCluster.executeJobBlocking(jobGraph))