-
Notifications
You must be signed in to change notification settings - Fork 534
8369049: [TestBug] Update JUnit to Version 6.0.0 #1925
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@Maran23 This requires a new third-party library, which will need approval. Also, I'll need to review the PR. Since you didn't make any changes to the test source code, I presume that JUnit 6 is compatible with 5 (leaving aside the removed deprecations, which don't affect us), unlike the transition from 4 to 5 (version 5 was effectively an entirely new API). I'll take a look at the release notes, but can you summarize the changes you are aware of? Reviewers: @kevinrushforth @arapte @tiainen or @johanvos /reviewers 3 |
@kevinrushforth |
This PR changes gradle build only. What about Eclipse and other IDEs? Are they compatible? Are we going to lose the ability to run junit tests from within the IDE? |
Yes, it is completely compatible and I could not spot any problems. Locally, everything works and also the GHA work (did a test run before I made the PR).
Sure! Most of the changes are either removal of deprecated functions or internal changes / dependency changes which we do not use. One interesting note and addition is:
Before:
After:
Yes they all are compatible, as nothing really changed when writing tests. Imports are the same, the methods are the same, everything is still compatible. I can also verify that it works in IntelliJ. |
Can you check out this branch and run the tests with the JUnit 5 Option? I'm sure it will work, as again, there is no breaking change here. |
I can, but what is the point of migration then? The moment someone uses a junit6 feature, the Eclipse project will break. |
I also don't see the hurry. Absent a compelling reason to update, we can wait for a while. |
Sure, but I can't think of any new features we might want to use. This should really be treated as a normal dependency update. Not that I think we need to merge this anytime soon (that's why I wrote "consider"), but if Eclipse doesn't have "support" for it in 6 months, I would stop waiting at one point. |
See https://github.com/junit-team/junit-framework/wiki/Upgrading-to-JUnit-6.0. |
JUnit 6.0.0 is out and we can consider updating to it.
Release Notes: https://docs.junit.org/current/release-notes/index.html#release-notes-6.0.0
Notes:
JUnit 6 now uses a single version number for all dependencies, that is platform, jupiter and vintage (which we do not use anymore). That makes updating it easier.
It also uses
JSpecify
, which is an annotation library for@NonNull
and@Nullable
. All version numbers for JUnit now use a single variable.Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1925/head:pull/1925
$ git checkout pull/1925
Update a local copy of the PR:
$ git checkout pull/1925
$ git pull https://git.openjdk.org/jfx.git pull/1925/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1925
View PR using the GUI difftool:
$ git pr show -t 1925
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1925.diff
Using Webrev
Link to Webrev Comment