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

pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6d94ace657 Cap poi-integration test parallelism and raise heap on CI
6d94ace657 is described below

commit 6d94ace657249b487959dd654ca9d9b1c6014e4e
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Sep 1 14:35:34 2026 +0100

    Cap poi-integration test parallelism and raise heap on CI
    
    The root build.gradle asks for strictly serial JUnit execution on CI, but
    poi-integration unconditionally re-enabled parallel execution, and the
    default dynamic strategy runs one thread per processor. Several tests
    materialising large XSSF workbooks concurrently (the XSSF additional tests
    load each workbook twice via ExcelComparator) drove the 2GB test JVM into
    OutOfMemoryError on the Jenkins nodes, with tests slowing progressively as
    the heap filled before the JUnit engine finally failed with
    "engine_junit-jupiter.executionError".
    
    On CI, keep parallel execution but pin it to 2 threads (the alternative
    already sketched in the root build.gradle) and raise the test JVM heap to
    3g. Local builds keep the dynamic parallelism.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
---
 poi-integration/build.gradle | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle
index cb9e3e2f2b..375b83da80 100644
--- a/poi-integration/build.gradle
+++ b/poi-integration/build.gradle
@@ -144,7 +144,21 @@ test {
 
     dependsOn { testJar }
 
-    systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
+    if (Boolean.valueOf(System.getenv("CI_BUILD"))) {
+        // On CI, cap the parallelism and give the test JVM more heap: the 
default dynamic
+        // strategy runs one thread per processor, and several tests 
materialising large
+        // XSSF workbooks concurrently (the XSSF additional tests load each 
workbook twice
+        // via ExcelComparator) drove the 2GB test JVM into OutOfMemoryError 
on the Jenkins
+        // nodes, with tests slowing down progressively as the heap filled.
+        // Note: these systemProperties deliberately override the 
strictly-serial CI
+        // settings from the root build.gradle for this module.
+        systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
+        systemProperties['junit.jupiter.execution.parallel.config.strategy'] = 
'fixed'
+        
systemProperties['junit.jupiter.execution.parallel.config.fixed.parallelism'] = 
'2'
+        maxHeapSize = '3g'
+    } else {
+        systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
+    }
 
     doFirst {
         jvmArgs += [


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to