Skip to content

Conversation

@rschmitt
Copy link
Contributor

This change enables JUnit 5's parallel mode. On my machine, this change causes ./mvnw to run in a third of the time (from 90 seconds to 30 seconds). Integration test time specifically has been reduced 80% (from 75 seconds to 15 seconds).

In order to prevent the introduction of reliability issues with CI builds, parallel execution is disabled in our maven.yml.

@ok2c
Copy link
Member

ok2c commented Dec 21, 2025

@rschmitt Could you also mark AlpnTests @Isolated? I am getting test failures in that class when tests get executed in parallel.

I am also seeing lots of warnings

WARNING: Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.
- file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5-testing/target/test-classes/junit-platform.properties (*)
- jar:file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5/target/httpcore5-5.5-alpha1-SNAPSHOT-tests.jar!/junit-platform.properties
Dec 21, 2025 9:46:24 AM org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
WARNING: Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.
- file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5-testing/target/test-classes/junit-platform.properties (*)
- jar:file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5/target/httpcore5-5.5-alpha1-SNAPSHOT-tests.jar!/junit-platform.properties
Dec 21, 2025 9:46:25 AM org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
WARNING: Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.
- file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5-testing/target/test-classes/junit-platform.properties (*)
- jar:file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5/target/httpcore5-5.5-alpha1-SNAPSHOT-tests.jar!/junit-platform.properties
Dec 21, 2025 9:46:25 AM org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
WARNING: Discovered 2 'junit-platform.properties' configuration files on the classpath (see below); only the first (*) will be used.
- file:/home/oleg/src/apache.org/httpcomponents/httpcore/httpcore5-testing/target/test-classes/junit-platform.properties (*)
...

Any chance those warnings could be avoided? They also seem to mess up SLF4J initialization

SLF4J: org.apache.hc.core5.testing.extension.classic.ClassicTestResources
SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work as normally expected.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: org.apache.hc.core5.testing.extension.classic.ClassicTestResources
SLF4J: org.apache.hc.core5.testing.extension.classic.ClassicTestResources
SLF4J: org.apache.hc.core5.testing.extension.classic.ClassicTestResources
SLF4J: org.apache.hc.core5.testing.extension.classic.ClassicTestResources

@rschmitt
Copy link
Contributor Author

Could you also mark AlpnTests @Isolated? I am getting test failures in that class when tests get executed in parallel.

There are three nested test classes in AlpnTests, two of which are disabled on macOS. I can mark these as @Isolated for now and come back to them later when I have better access to other test environments.

I am also seeing lots of warnings

Easy fix

They also seem to mess up SLF4J initialization

This appears benign but I think I can suppress it

This change enables JUnit 5's parallel mode. On my machine, this change
causes `./mvnw` to run in a third of the time (from 90 seconds to 30
seconds). Integration test time specifically has been reduced 80% (from
75 seconds to 15 seconds).

In order to prevent the introduction of reliability issues with CI
builds, parallel execution is disabled in our `maven.yml`.
@rschmitt rschmitt merged commit 2648f67 into apache:master Dec 22, 2025
10 checks passed
@rschmitt rschmitt deleted the parallel branch December 22, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants