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

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

commit ec02b44cb56aefd17c0afc71b29d2213918881c6
Author: Rui Fan <[email protected]>
AuthorDate: Sun Apr 12 22:18:33 2026 +0200

    [FLINK-39423][tests] Fix UnalignedCheckpointTestBase missing config 
randomization
---
 .../test/checkpointing/UnalignedCheckpointTestBase.java      | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git 
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java
 
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java
index 71163de5b02..efa88a570d6 100644
--- 
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java
+++ 
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java
@@ -164,7 +164,8 @@ abstract class UnalignedCheckpointTestBase {
         FsStateChangelogStorageFactory.configure(
                 conf, TempDirUtils.newFolder(temp), Duration.ofMinutes(1), 10);
 
-        final StreamGraph streamGraph = getStreamGraph(settings, conf);
+        // Only used to calculate the required slots for the mini cluster.
+        StreamGraph streamGraph = getStreamGraph(settings, conf);
         final int requiredSlots =
                 streamGraph.getStreamNodes().stream()
                         .mapToInt(StreamNode::getParallelism)
@@ -181,6 +182,10 @@ abstract class UnalignedCheckpointTestBase {
                                 .build());
         miniCluster.before();
 
+        // Rebuild stream graph via getExecutionEnvironment which now triggers
+        // TestStreamEnvironment's randomizeConfiguration via the registered 
factory.
+        streamGraph = getStreamGraph(settings, conf);
+
         final CheckpointGenerationMode mode = 
settings.checkpointGenerationMode;
         JobID jobID = null;
         try {
@@ -246,9 +251,10 @@ abstract class UnalignedCheckpointTestBase {
     }
 
     private StreamGraph getStreamGraph(UnalignedSettings settings, 
Configuration conf) {
-        // a dummy environment used to retrieve the DAG, mini cluster will be 
used later
+        // Use getExecutionEnvironment so that TestStreamEnvironment's 
randomizeConfiguration
+        // is triggered when the factory is registered (after 
miniCluster.before()).
         final StreamExecutionEnvironment setupEnv =
-                StreamExecutionEnvironment.createLocalEnvironment(conf);
+                StreamExecutionEnvironment.getExecutionEnvironment(conf);
         settings.configure(setupEnv);
 
         settings.dagCreator.create(

Reply via email to