Skip to content

8373796: Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5#390

Open
rm-gh-8 wants to merge 1 commit intoopenjdk:masterfrom
rm-gh-8:JDK-8373796-V25
Open

8373796: Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5#390
rm-gh-8 wants to merge 1 commit intoopenjdk:masterfrom
rm-gh-8:JDK-8373796-V25

Conversation

@rm-gh-8
Copy link
Contributor

@rm-gh-8 rm-gh-8 commented Mar 13, 2026

Backporting JDK-8373796: Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5.

This PR migrates the ThrowingPublishers test family (8 tests + abstract base) from TestNG to JUnit 5, converting data providers to @MethodSource, instance state to static, and the stop-after-first-failure mechanism to a JUnit TestWatcher/BeforeEachCallback extension..

For parity with Oracle JDK.

This PR is not clean because "test/jdk/java/net/httpclient/AbstractThrowingPublishers.java" skips a commit implementing JEP 517 (openjdk/jdk@e8db14f) which is not part of JDK 25. The file has been updated to preserve existing functionality while excluding the JEP 517 changes.

Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:

make test TEST="test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java test/jdk/java/net/httpclient/ThrowingPublishersSanity.java"


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8373796 needs maintainer approval

Issue

  • JDK-8373796: Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5 (Sub-task - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/390/head:pull/390
$ git checkout pull/390

Update a local copy of the PR:
$ git checkout pull/390
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/390/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 390

View PR using the GUI difftool:
$ git pr show -t 390

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/390.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2026

👋 Welcome back rm-gh-8! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 13, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport c6da35d7c7076aa9643b3dbf03a285420bb1003d 8373796: Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5 Mar 13, 2026
@openjdk
Copy link

openjdk bot commented Mar 13, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Mar 13, 2026
@rm-gh-8 rm-gh-8 marked this pull request as ready for review March 13, 2026 21:18
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 13, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant