RFR: 8378163: test/jdk/java/net/httpclient/*.java: convert tests that use ITestContext to JUnit

Daniel Fuchs dfuchs at openjdk.org
Wed Feb 18 12:28:31 UTC 2026


This is a first step that converts all tests directly located in the test/jdk/java/net/httpclient directory and which depend on ITestContext (a TestNG API) to use JUnit instead. 

Usage of ITestContext is replaced by registering a TestWatcher which can make JUnit stop at the first failure.
The proposed change is mostly mechanical - with the exception of SpecialHeadersTest which is now also testing HTTP/3.
Some logging in a few of the tests has also been improved.

This is a test change only.

-------------

Commit messages:
 - 8378163: test/jdk/java/net/httpclient/*.java: convert tests that use ITestContext to JUnit

Changes: https://git.openjdk.org/jdk/pull/29786/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29786&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8378163
  Stats: 1067 lines in 15 files changed: 385 ins; 331 del; 351 mod
  Patch: https://git.openjdk.org/jdk/pull/29786.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29786/head:pull/29786

PR: https://git.openjdk.org/jdk/pull/29786


More information about the net-dev mailing list