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

pvary pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 51d5b0963b Build: Allow overriding the default test parallelism of 1 
and update parallelism for Flink test (#13675)
51d5b0963b is described below

commit 51d5b0963b8aeb86794bad35e8a882cf33655df4
Author: Maximilian Michels <[email protected]>
AuthorDate: Thu Nov 20 10:02:39 2025 +0100

    Build: Allow overriding the default test parallelism of 1 and update 
parallelism for Flink test (#13675)
---
 .github/workflows/flink-ci.yml |  2 +-
 build.gradle                   | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml
index 5e65dab4d1..365744ef90 100644
--- a/.github/workflows/flink-ci.yml
+++ b/.github/workflows/flink-ci.yml
@@ -91,7 +91,7 @@ jobs:
         key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 
'**/gradle-wrapper.properties') }}
         restore-keys: ${{ runner.os }}-gradle-
     - run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | 
cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
-    - run: ./gradlew -DsparkVersions= -DkafkaVersions= -DflinkVersions=${{ 
matrix.flink }} :iceberg-flink:iceberg-flink-${{ matrix.flink }}:check 
:iceberg-flink:iceberg-flink-runtime-${{ matrix.flink }}:check -Pquick=true -x 
javadoc
+    - run: ./gradlew -DsparkVersions= -DkafkaVersions= -DflinkVersions=${{ 
matrix.flink }} :iceberg-flink:iceberg-flink-${{ matrix.flink }}:check 
:iceberg-flink:iceberg-flink-runtime-${{ matrix.flink }}:check -Pquick=true -x 
javadoc -DtestParallelism=auto
     - uses: actions/upload-artifact@v4
       if: failure()
       with:
diff --git a/build.gradle b/build.gradle
index fcd6dcb780..0f86c629a4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -164,6 +164,19 @@ subprojects {
     }
   }
 
+  def testParallelism = System.getProperty('testParallelism')
+  if (testParallelism != null) {
+    def numTestWorkers
+    if (testParallelism.equalsIgnoreCase('auto')) {
+      numTestWorkers = Math.ceil(Runtime.getRuntime().availableProcessors() / 
2.0) as int
+    } else {
+      numTestWorkers = testParallelism as int
+    }
+    tasks.withType(Test).configureEach {
+      maxParallelForks = numTestWorkers
+    }
+  }
+
   configurations {
     testImplementation.extendsFrom compileOnly
 

Reply via email to