RFR: 8274274: Update JUnit to version 5.8.1 [v5]

Michael Strauß mstrauss at openjdk.java.net
Mon Nov 15 16:44:46 UTC 2021


On Thu, 11 Nov 2021 15:18:25 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> I left a few comments on the dependencies. Will review / test the PR later.
> 
> One comment about adding new JUnit 5 tests and migrating existing tests. I think there could be value in organizing the tests such that all of the JUnit 5 tests are grouped, rather than mixing tests in the same directory such that some use JUnit 5 and others use JUnit 4. What do you (or others) think? We could either do this with a new JUnit 5 source set in each project, or by using a package naming convention for JUnit 5 tests like we do for robot tests. Maybe `test5.some.pkg`. This needs more thought.

I don't like the idea of separating source sets or packages just based on the version of our unit test framework. In my opinion, sources should be organized by function, and not based on a technicality. A very common case we'll encounter will be adding a new unit test to an existing test class. What's our guidance in this case? If we continue to use JUnit4 for new unit tests, that means we'll effectively persist this version of the framework forever in the test sources. Another option would be to migrate the entire test class once it's updated with new code. However, that would be a significant amount of work required from the author of a new unit test. A third option would be to actually migrate all unit test classes as a series of refactoring PRs.

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

PR: https://git.openjdk.java.net/jfx/pull/633


More information about the openjfx-dev mailing list