You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gu...@apache.org on 2024/09/24 10:16:37 UTC

(flink) branch master updated: [FLINK-36349][tests] Fix ClosureCleanerITCase fail in the AdaptiveScheduler test profile

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

guoweijie 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 b2d328919c0 [FLINK-36349][tests] Fix ClosureCleanerITCase fail in the AdaptiveScheduler test profile
b2d328919c0 is described below

commit b2d328919c0244c54427e82e71b7c1c4ac9aff8a
Author: Xu Huang <13...@users.noreply.github.com>
AuthorDate: Tue Sep 24 18:16:30 2024 +0800

    [FLINK-36349][tests] Fix ClosureCleanerITCase fail in the AdaptiveScheduler test profile
---
 .../java/org/apache/flink/api/functions/ClosureCleanerITCase.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/flink-tests/src/test/java/org/apache/flink/api/functions/ClosureCleanerITCase.java b/flink-tests/src/test/java/org/apache/flink/api/functions/ClosureCleanerITCase.java
index 12d80ac915f..e04a0a1b914 100644
--- a/flink-tests/src/test/java/org/apache/flink/api/functions/ClosureCleanerITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/api/functions/ClosureCleanerITCase.java
@@ -18,6 +18,7 @@
 
 package org.apache.flink.api.functions;
 
+import org.apache.flink.api.common.RuntimeExecutionMode;
 import org.apache.flink.api.common.functions.ReduceFunction;
 import org.apache.flink.api.common.serialization.SimpleStringEncoder;
 import org.apache.flink.connector.file.sink.FileSink;
@@ -86,6 +87,7 @@ class ClosureCleanerITCase {
             NonSerializable nonSer = new NonSerializable();
             int x = 5;
             StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
+            env.setRuntimeMode(RuntimeExecutionMode.BATCH);
             DataStreamSource<Long> nums = env.fromSequence(1, 4);
             nums.map(num -> num + x)
                     .setParallelism(1)
@@ -111,6 +113,7 @@ class ClosureCleanerITCase {
         public void run(String resultPath) throws Exception {
             NonSerializable nonSer = new NonSerializable();
             StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
+            env.setRuntimeMode(RuntimeExecutionMode.BATCH);
             DataStreamSource<Long> nums = env.fromSequence(1, 4);
             nums.map(num -> num + getX())
                     .setParallelism(1)
@@ -138,6 +141,7 @@ class ClosureCleanerITCase {
             NonSerializable nonSer2 = new NonSerializable();
             int x = 5;
             StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
+            env.setRuntimeMode(RuntimeExecutionMode.BATCH);
             DataStreamSource<Long> nums = env.fromSequence(1, 4);
             nums.map(num -> num + x)
                     .setParallelism(1)
@@ -159,6 +163,7 @@ class ClosureCleanerITCase {
             NonSerializable nonSer2 = new NonSerializable();
             int x = 5;
             StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
+            env.setRuntimeMode(RuntimeExecutionMode.BATCH);
             DataStreamSource<Long> nums = env.fromSequence(1, 4);
             nums.map(num -> num + x)
                     .setParallelism(1)