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

Daniel Fuchs dfuchs at openjdk.org
Fri Feb 20 11:10:30 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.

Daniel Fuchs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - Merge branch 'master' into ITestContext-httpclient-8378163
 - Remove Lifecycle.PER_CLASS
 - Merge branch 'master' into ITestContext-httpclient-8378163
 - 8378163: test/jdk/java/net/httpclient/*.java: convert tests that use ITestContext to JUnit

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29786/files
  - new: https://git.openjdk.org/jdk/pull/29786/files/e3fb24b4..05ad7d2d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29786&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29786&range=01-02

  Stats: 3384 lines in 83 files changed: 746 ins; 2479 del; 159 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