Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8301767: Convert virtual thread tests to JUnit #12426

Closed
wants to merge 7 commits into from

Conversation

AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Feb 4, 2023

The non-hotspot tests integrated with JEP 425/428 were mostly TestNG tests. We'd like to convert these JUnit in the main line in advance of other updates to these tests in 21. The changes are mostly mechanical and trivial:

  • BeforeClass/AfterClass changed to static BeforeAll/AfterAll methods
  • Tests using data providers are changed to parameterized tests
  • The order of the parameters to assertEquals are swapped so that the expected result is the first parameter
  • Usages of expectThrows are changed to assertThrows
  • Tests that threw SkipException are changed to the Assumptions API

There are a small number of drive-by changes to the tests, nothing significant, e.g.

  • GetStackTrace and ParkWithFixedThreadPool changed from "@run testng" to "@run main" as they aren't TestNG tests.
  • A few of the tests in StructuredTaskScopeTest for joinXXX are changed to use a CountDownLatch rather than sleeping, as the original tests weren't very robust.

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

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12426/head:pull/12426
$ git checkout pull/12426

Update a local copy of the PR:
$ git checkout pull/12426
$ git pull https://git.openjdk.org/jdk pull/12426/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12426

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12426.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 4, 2023

👋 Welcome back alanb! 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 Feb 4, 2023

@AlanBateman The following labels will be automatically applied to this pull request:

  • core-libs
  • jmx
  • net
  • nio
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@AlanBateman
Copy link
Contributor Author

/label remove jmx
/label remove nio
/label remove net

@openjdk
Copy link

openjdk bot commented Feb 4, 2023

@AlanBateman
The jmx label was successfully removed.

@openjdk
Copy link

openjdk bot commented Feb 4, 2023

@AlanBateman
The nio label was successfully removed.

@openjdk
Copy link

openjdk bot commented Feb 4, 2023

@AlanBateman
The net label was successfully removed.

@AlanBateman AlanBateman changed the title 8301767: Convert virtual threads tests to JUnit 8301767: Convert virtual thread tests to JUnit Feb 4, 2023
@AlanBateman AlanBateman marked this pull request as ready for review February 7, 2023 07:08
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 7, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 7, 2023

Webrevs

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good Alan

@openjdk
Copy link

openjdk bot commented Feb 7, 2023

@AlanBateman this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8301767
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Feb 7, 2023
@openjdk
Copy link

openjdk bot commented Feb 8, 2023

@AlanBateman This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8301767: Convert virtual thread tests to JUnit

Reviewed-by: cstein, lancea, jpai

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 5 new commits pushed to the master branch:

  • c92a7de: 8301380: jdk/jfr/api/consumer/streaming/TestCrossProcessStreaming.java
  • 0f08785: 8301756: Missed constructor from 8301659
  • 4de2d3c: 8301862: G1: Remove G1PageBasedVirtualSpace::_executable
  • e628fd5: 8301214: Adjust handshakeTimeout value in test HandshakeTimeout.java after 8189338
  • ac7119f: 8280126: C2: detect and remove dead irreducible loops

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 8, 2023
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Feb 8, 2023
Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Alan for the changes. The latest version of this PR (commit 86af188), looks fine to me.

@AlanBateman
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 8, 2023

Going to push as commit ecf21a9.
Since your change was applied there have been 7 commits pushed to the master branch:

  • 9af2ea2: 8301828: Avoid unnecessary array fill after creation in javax.swing.text
  • 3db352d: 8302047: G1: Remove unused G1RegionToSpaceMapper::_region_granularity
  • c92a7de: 8301380: jdk/jfr/api/consumer/streaming/TestCrossProcessStreaming.java
  • 0f08785: 8301756: Missed constructor from 8301659
  • 4de2d3c: 8301862: G1: Remove G1PageBasedVirtualSpace::_executable
  • e628fd5: 8301214: Adjust handshakeTimeout value in test HandshakeTimeout.java after 8189338
  • ac7119f: 8280126: C2: detect and remove dead irreducible loops

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 8, 2023
@openjdk openjdk bot closed this Feb 8, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 8, 2023
@openjdk
Copy link

openjdk bot commented Feb 8, 2023

@AlanBateman Pushed as commit ecf21a9.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

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

Successfully merging this pull request may close these issues.

4 participants