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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8147b54482 TODO-252: Enable reactor -T1C parallel module test execution
8147b54482 is described below

commit 8147b54482e26c02bfae74d676afa27a3cb1794a
Author: James Bognar <[email protected]>
AuthorDate: Fri Jul 17 09:23:48 2026 -0400

    TODO-252: Enable reactor -T1C parallel module test execution
    
    Tune the Maven reactor for parallel-module test builds:
    - juneau-distrib/pom.xml: declare copied reactor artifacts as provided-scope
      deps to fix the MDEP-187 dependency:copy ordering race under -T.
    - juneau-integration-tests/pom.xml: bump Surefire forkCount 4->8 on the
      in-memory core bucket.
    - scripts/test.py: set PARALLELISM = "-T1C" on build + test.
    - perf-baseline.txt: re-baseline for the parallel model (suite 281->130 plus
      per-module refresh).
    
    Co-authored-by: Cursor <[email protected]>
---
 juneau-distrib/pom.xml           | 250 +++++++++++++++++++++++++++++++++++++++
 juneau-integration-tests/pom.xml |   2 +-
 perf-baseline.txt                |  77 ++++++++----
 scripts/test.py                  |  11 +-
 4 files changed, 316 insertions(+), 24 deletions(-)

diff --git a/juneau-distrib/pom.xml b/juneau-distrib/pom.xml
index 8633a1df5b..455dffcc5a 100644
--- a/juneau-distrib/pom.xml
+++ b/juneau-distrib/pom.xml
@@ -30,6 +30,256 @@
        <name>Apache Juneau Distribution</name>
        <description>Apache Juneau Distribution</description>
 
+       <!--
+               These dependencies exist purely to give the Maven reactor the 
module-ordering edges the
+               maven-dependency-plugin:copy / maven-assembly-plugin executions 
below rely on.  Without them a
+               parallel build (mvn -T ...) can start this module's package 
phase before the reactor artifacts it
+               copies have been packaged, causing MDEP-187 ("... has not been 
packaged yet") failures.  Declaring
+               every copied reactor artifact as a dependency forces the 
reactor to build them first.  Scope is
+               'provided' because distrib never ships a consumable artifact 
that would need these transitively.
+       -->
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-shaded-core</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-shaded-rest-client</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-shaded-rest-server</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       
<artifactId>juneau-shaded-rest-server-springboot</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-shaded-all</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-commons</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-test</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-marshall</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-config</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-atom</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-common</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-html5</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-jsonschema</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-mcp</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-openapi-v3</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-bean-swagger-v2</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-common</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-common-classic</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-mcp</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-auth-jwt</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-auth-saml</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-auth-oauth</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-auth-oidc-rp</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-view-jsp</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       
<artifactId>juneau-rest-server-view-thymeleaf</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       
<artifactId>juneau-rest-server-view-mustache</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       
<artifactId>juneau-rest-server-view-freemarker</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-server-springboot</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-client</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-client-classic</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-rest-mock</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-microservice</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-microservice-jetty</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-microservice-tomcat</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-sc-client</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-sc-server</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <!-- These two are copied only as their assembly-produced 'bin' 
zip; match that exact artifact. -->
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-examples-core</artifactId>
+                       <version>${project.version}</version>
+                       <classifier>bin</classifier>
+                       <type>zip</type>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.juneau</groupId>
+                       <artifactId>juneau-petstore-jetty</artifactId>
+                       <version>${project.version}</version>
+                       <classifier>bin</classifier>
+                       <type>zip</type>
+                       <scope>provided</scope>
+               </dependency>
+       </dependencies>
+
        <build>
                <plugins>
 
diff --git a/juneau-integration-tests/pom.xml b/juneau-integration-tests/pom.xml
index 5a1f20f7ab..63758c684e 100644
--- a/juneau-integration-tests/pom.xml
+++ b/juneau-integration-tests/pom.xml
@@ -689,7 +689,7 @@
                                                                isolated 
(classes run sequentially within a fork).  Container tests keep the
                                                                default single 
fork.
                                                        -->
-                                                       <forkCount>4</forkCount>
+                                                       <forkCount>8</forkCount>
                                                        
<reuseForks>true</reuseForks>
                                                </configuration>
                                        </execution>
diff --git a/perf-baseline.txt b/perf-baseline.txt
index f85a898f3d..79db7dfe34 100644
--- a/perf-baseline.txt
+++ b/perf-baseline.txt
@@ -38,27 +38,62 @@
 # ignored by the per-module perf-guard parser.
 # ============================================================================
 
-# 2026-07-13 re-baseline (set by FINISHED-232): fresh warm-machine full-suite 
run via
-# `python3 scripts/test.py --full`, SERIAL / single-threaded execution model 
(no
-# reactor -T, no Surefire forkCount/parallel — parallelism stays OFF per 
FINISHED-231's
-# Phase-0 isolation-audit gate). Post-TODO-160-migration reality: 135,130 
tests, suite wall-clock 281s.
-# Per-module values are test.py timing-log wall-clock seconds (incl. per-fork 
JVM startup).
-suite = 281                              # set by FINISHED-232 (2026-07-13 
re-baseline); measured 281.2s warm/serial.
-juneau-integration-tests/core = 88                   # set by FINISHED-232; 
measured 88.3s (time-dominant bucket).
-juneau-integration-tests/container.springboot = 5    # set by FINISHED-232; 
measured 4.9s.
-juneau-integration-tests/container.jetty = 8         # set by FINISHED-232; 
measured 7.5s under full-load; jetty container time is 
startup/shutdown-variable.
-juneau-core/juneau-marshall/core = 17.5              # set by FINISHED-232; 
76,973 tests (count-dominant, fast in-memory).
-juneau-core/juneau-marshall-rdf/core = 9.2           # set by FINISHED-232; 
21,921 tests.
-juneau-microservice/juneau-microservice/core = 12.3  # set by FINISHED-232; 
205 tests but embedded-server startup heavy; time-variable.
-juneau-core/juneau-commons/core = 1.9                # set by FINISHED-232; 
5,311 tests.
-juneau-core/juneau-config/core = 2.7                 # set by FINISHED-232; 
458 tests.
-juneau-bean/juneau-bean-atom/core = 0.4
-juneau-bean/juneau-bean-common/core = 1.0
-juneau-bean/juneau-bean-html5/core = 3.4             # set by FINISHED-232; 
12,427 tests.
-juneau-bean/juneau-bean-mcp/core = 0.4
-juneau-bean/juneau-bean-openapi-v3/core = 1.0        # set by FINISHED-232; 
measured 1.05s.
-juneau-bean/juneau-bean-swagger-v2/core = 0.9        # set by FINISHED-232; 
measured 0.87s.
-juneau-bean/juneau-bean-jsonschema/core = 0.6        # set by FINISHED-232; 
measured 0.63s.
+# 2026-07-17 parallel-model re-baseline (set by TODO-252, superseding the 
FINISHED-232 serial
+# baseline): warm-machine full-suite runs via `python3 scripts/test.py 
--full`, PARALLEL execution
+# model — reactor `mvn -T1C` parallel *module* builds (enabled in 
scripts/test.py) + Surefire
+# `forkCount=8` on the juneau-integration-tests core bucket.  135,210 tests.
+#
+# IMPORTANT — reading these numbers under the parallel model:
+#   * The 'suite' value is the AUTHORITATIVE metric: it is the real subprocess 
wall-clock of the
+#     parallel `mvn test` phase.  Measured 122-130s across 3 green runs (was 
281s serial ≈ -55%).
+#   * The per-'<module>/<bucket>' values are NOT real wall-clock under -T.  
scripts/test.py derives
+#     them by SUMMING each test class's Surefire <time> for the module; under 
-T1C those per-class
+#     wall-times are inflated by CPU contention (up to 16 module builds run 
concurrently) and, for
+#     forked buckets, further multiplied by forkCount (e.g. 
integration-tests/core sums ~230s across
+#     its 8 forks while its real module wall-clock is a fraction of that).  
They are therefore
+#     ADVISORY only — self-consistent within this fixed -T1C+forkCount=8 
model, useful for catching a
+#     large per-module regression, but not comparable to the old serial 
per-module seconds.
+#   * Values below are the MAX observed across the 3 re-baseline runs (rounded 
up) so normal
+#     warm-cache/JIT variance does not trip the ±20% guard; only a real 
>20%-over-worst jump fires.
+suite = 130                                          # parallel wall-clock; 
measured 122-130s across 3 runs.
+juneau-integration-tests/core = 252                  # -T+forkCount=8 
summed/inflated (real module wall-clock far lower); time-dominant.
+juneau-integration-tests/container.springboot = 5.5
+juneau-integration-tests/container.jetty = 9         # 
startup/shutdown-variable.
+juneau-microservice/juneau-microservice-examples/core = 22.5
+juneau-core/juneau-marshall/core = 17.5              # 76,973 tests 
(count-dominant, fast in-memory).
+juneau-core/juneau-marshall-rdf/core = 15.5          # 21,921 tests.
+juneau-rest/juneau-rest-server-auth-saml/core = 13.5
+juneau-rest/juneau-rest-server-springboot/container.springboot = 11.5
+juneau-rest/juneau-rest-server-view-jsp/core = 10
+juneau-petstore/juneau-petstore-jetty/container.jetty = 9.5
+juneau-petstore/juneau-petstore-springboot/container.springboot = 9.5
+juneau-rest/juneau-rest-server-view-thymeleaf/core = 8.5
+juneau-rest/juneau-rest-server-auth-jwt/core = 7.5
+juneau-rest/juneau-rest-server-metrics-micrometer/core = 7.5
+juneau-rest/juneau-rest-server-view-freemarker/core = 7.5
+juneau-microservice/juneau-microservice/core = 7.5   # embedded-server startup 
heavy; time-variable.
+juneau-rest/juneau-rest-server-view-mustache/core = 7
+juneau-rest/juneau-rest-server-auth-oidc-rp/core = 6.6
+juneau-rest/juneau-rest-server-mcp/core = 6.5
+juneau-rest/juneau-rest-server-tracing-otel/core = 6
+juneau-bean/juneau-bean-html5/core = 5.5             # 12,427 tests.
+juneau-core/juneau-config/core = 4
+juneau-petstore/juneau-petstore-core/core = 4.5
+juneau-rest/juneau-rest-server-reactive/core = 4
+juneau-bean/juneau-bean-common/core = 2.8
+juneau-microservice/juneau-microservice-jetty/core = 3
+juneau-bean/juneau-bean-jsonschema/core = 2.5
+juneau-rest/juneau-rest-server/core = 2.6
+juneau-rest/juneau-rest-mock/core = 2.3
+juneau-rest/juneau-rest-server-auth-oauth/core = 2.5
+juneau-core/juneau-commons/core = 2.2                # 5,311 tests.
+juneau-bean/juneau-bean-mcp/core = 2
+juneau-bean/juneau-bean-atom/core = 2
+juneau-bean/juneau-bean-jsonapi/core = 2
+juneau-bean/juneau-bean-hal/core = 2
+juneau-bean/juneau-bean-jsonpatch/core = 2
+juneau-bean/juneau-bean-openapi-v3/core = 1.5
+juneau-bean/juneau-bean-swagger-v2/core = 1.3
 
 # ─── [observability] 
──────────────────────────────────────────────────────────
 #
diff --git a/scripts/test.py b/scripts/test.py
index c8cb49d000..2006d9e05d 100755
--- a/scripts/test.py
+++ b/scripts/test.py
@@ -361,12 +361,19 @@ def run_perf_guard(test_elapsed: float, baseline_file: 
Path, timing_log_path, en
        return 0
 
 
+# Reactor-level parallel *module* builds.  -T1C runs one build thread per CPU 
core, so independent
+# reactor modules (and their test forks) build concurrently, overlapping the 
otherwise-serial
+# per-module test phases.  Requires the juneau-distrib dependency:copy 
ordering fix (MDEP-187) to be
+# -T-safe.  This is parallel *module* execution only, NOT in-JVM concurrent 
test classes/methods.
+PARALLELISM = "-T1C"
+
+
 def build(verbose=False):
-       return run_command("mvn clean install -DskipTests", verbose)
+       return run_command(f"mvn clean install {PARALLELISM} -DskipTests", 
verbose)
 
 
 def test(verbose=False, no_container=False):
-       cmd = "mvn test -Drat.skip=true"
+       cmd = f"mvn test {PARALLELISM} -Drat.skip=true"
        if no_container:
                cmd += " -DexcludedGroups=container"
        return run_command(cmd, verbose)

Reply via email to