[jdk25u-dev] RFR: 8373869: Refactor java/net/httpclient/ThrowingPushPromises*.java tests to use JUnit5
Roland Mesde
duke at openjdk.org
Tue Feb 24 16:14:44 UTC 2026
Backporting JDK-8373869: Refactor java/net/httpclient/ThrowingPushPromises*.java tests to use JUnit5.
This PR migrates HTTP client tests from TestNG's ITestContext API to JUnit5 using a static TestWatcher to halt test execution after the first failure.
The PR is not clean because it skips https://github.com/openjdk/jdk/commit/e8db14f584fa92db170e056bc68074ccabae82c9 which adds support for JEP 517 (not in 25) to test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java. test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java was updated to remove JEP 517 related changes.
For parity with Oracle JDK.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST="test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java"
Results attached:
[windows-x64-specific-test.log](https://github.com/user-attachments/files/25524757/windows-x64-specific-test.log)
[macos-aarch64-specific-test.log](https://github.com/user-attachments/files/25524758/macos-aarch64-specific-test.log)
[linux-x64-specific-test.log](https://github.com/user-attachments/files/25524759/linux-x64-specific-test.log)
[linux-aarch64-specific-test.log](https://github.com/user-attachments/files/25524760/linux-aarch64-specific-test.log)
-------------
Commit messages:
- Add static modifier
- Backport e5ca77838b9243321ed66afc2f460378d25add63
Changes: https://git.openjdk.org/jdk25u-dev/pull/305/files
Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=305&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373869
Stats: 150 lines in 8 files changed: 51 ins; 39 del; 60 mod
Patch: https://git.openjdk.org/jdk25u-dev/pull/305.diff
Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/305/head:pull/305
PR: https://git.openjdk.org/jdk25u-dev/pull/305
More information about the jdk-updates-dev
mailing list