JDK-8274274 : Update JUnit to version 5.8.1
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: other
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-24
  • Updated: 2022-05-12
  • Resolved: 2021-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u341Fixed openjfx11.0.16Fixed
Related Reports
Relates :  
Description
Adding this dependency should be of no impact but would allow tests tests to be written using JUnit 5 which offers a cleaner API.

JUnit 5 also allows nested tests which makes it cleaner to write tests that need to change the state of a component then test various invariants, then change the state again, test different invariants.
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jfx17u/pull/58 Date: 2022-05-09 21:18:07 +0000
09-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jfx11u/pull/97 Date: 2022-04-30 13:45:39 +0000
30-04-2022

I plan to backport this to facilitate backports of bugs that use JUnit 5 in their tests.
13-04-2022

Changeset: ff6e8d50 Author: John Hendrikx <jhendrikx@openjdk.org> Committer: Kevin Rushforth <kcr@openjdk.org> Date: 2021-12-11 12:23:58 +0000 URL: https://git.openjdk.java.net/jfx/commit/ff6e8d50badd57549811391b1380707bb94ac55b
11-12-2021

[~jhendrikx] All tasks are now completed. You can proceed with the update to JUnit 5.8.1, using JUnit 4.13.2 in compatibility mode for the existing tests.
10-11-2021

It looks like I spoke too soon. I was informed today that there is still an outstanding task related to getting approval. I'll update when I get more information.
22-10-2021

[~jhendrikx] We now have the needed approvals in place to update to JUnit 5.8.1, including using JUnit 4.13.2 in compatibility mode, so the code review can proceed. You will see that I modified the title of this bug to match our usual practice when doing a third-party library update, so you will need to update the title of the PR accordingly. I will sponsor the PR once the review completes.
20-10-2021

I've submitted https://github.com/openjdk/jfx/pull/633. Please let me know what else I can do to move this forward. The license for JUnit 5 is the same as JUnit 4, but I can imagine the process to get approval might be a bit more involved. The addition was relatively painless, apart from having to update the verification-metadata.xml as some artifacts only get accessed during the full build. Took a few hours (including waiting for builds).
24-09-2021

[~jhendrikx] I see that you assigned this to yourself. If you want to propose the needed changes to the build in support of this, we can discuss them. Ultimately, we will need to make the actual change to use the third-party artifact, because of the third-party licensing restrictions. The questions will then be around the timing for doing this and getting the needed third-party approval.
24-09-2021

I took a (very brief) look at this a few months ago. I don't think this is a trivial update, but it likely wouldn't be a large effort, either. JUnit 5 has a JUnit 4 compatibility mode, which we would almost certainly need to use. Then tests could migrate over time. As with any third-party dependency, we need to get prior approval to do this update. This is something we could consider doing for an upcoming test sprint.
24-09-2021