You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by rs...@apache.org on 2026/01/18 20:18:14 UTC
(httpcomponents-client) branch master updated: Prepare to parallelize tests
This is an automated email from the ASF dual-hosted git repository.
rschmitt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 41412119d Prepare to parallelize tests
41412119d is described below
commit 41412119dafc29dcbad31bbbd5ab8facf4aae6aa
Author: Ryan Schmitt <rs...@apache.org>
AuthorDate: Sun Dec 21 18:50:45 2025 -0500
Prepare to parallelize tests
This change sets up `httpclient5` and `httpclient5-testing` for
parallelization. When they pick up the next release of httpcore5, they
will pull in its `junit-platform.properties`, as well as the
`LoggingInitializationListener` that initializes Slf4j before any tests
run.
---
.github/workflows/maven.yml | 2 +-
httpclient5-testing/pom.xml | 7 ++++++-
httpclient5/pom.xml | 13 ++++++++++++-
.../org/apache/hc/client5/http/impl/ExecSupportTest.java | 2 ++
.../impl/auth/TestSystemDefaultCredentialsProvider.java | 2 ++
pom.xml | 6 ++++++
6 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 696cc3f0b..4a3f72a78 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -49,4 +49,4 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
- run: ./mvnw -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains,docker
+ run: ./mvnw -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -Djunit.jupiter.execution.parallel.enabled=false -P-use-toolchains,docker
diff --git a/httpclient5-testing/pom.xml b/httpclient5-testing/pom.xml
index 84e1ef5bb..42176ccb5 100644
--- a/httpclient5-testing/pom.xml
+++ b/httpclient5-testing/pom.xml
@@ -88,6 +88,11 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
@@ -159,4 +164,4 @@
</plugins>
</reporting>
-</project>
\ No newline at end of file
+</project>
diff --git a/httpclient5/pom.xml b/httpclient5/pom.xml
index 37c924eb8..561ca52cc 100644
--- a/httpclient5/pom.xml
+++ b/httpclient5/pom.xml
@@ -57,6 +57,12 @@
<artifactId>conscrypt-openjdk-uber</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents.core5</groupId>
+ <artifactId>httpcore5</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5-reactive</artifactId>
@@ -88,6 +94,11 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
@@ -206,4 +217,4 @@
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/ExecSupportTest.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/ExecSupportTest.java
index 88c577353..0543f47ea 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/ExecSupportTest.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/ExecSupportTest.java
@@ -28,7 +28,9 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
+@Isolated
class ExecSupportTest {
@Test
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestSystemDefaultCredentialsProvider.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestSystemDefaultCredentialsProvider.java
index 2aec4041d..ce71b055b 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestSystemDefaultCredentialsProvider.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/auth/TestSystemDefaultCredentialsProvider.java
@@ -40,12 +40,14 @@
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Isolated;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
/**
* Simple tests for {@link SystemDefaultCredentialsProvider}.
*/
+@Isolated
class TestSystemDefaultCredentialsProvider {
private final static String PROXY_PROTOCOL1 = "http";
diff --git a/pom.xml b/pom.xml
index 1a0d7291c..ea11f3ef2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,6 +94,12 @@
<artifactId>httpcore5</artifactId>
<version>${httpcore.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents.core5</groupId>
+ <artifactId>httpcore5</artifactId>
+ <version>${httpcore.version}</version>
+ <classifier>tests</classifier>
+ </dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5-h2</artifactId>