JUNIT 5
pnrobinson opened this issue · 5 comments
I think it will be good to update the unit tests to JUNIT5 to keep things up to date and make it easier to possibly use a more modern Java with some future version of Jannovar. The easiest way to migrate is to use a "vintage" package that let's you use JUNIT4 and 5 at the same time, basically. There are only a few things that Junit4 does that are hard to do in Junit5, but we can slowly update the unit tests and pull the switch if everything works.
@julesjacobsen @visze @holtgrewe Is there anything that speaks against this?
Hi Nick, can you give a concrete example what would be immediately useful right now in Jannovar? Jannovar should stay on Java 8 IMO for now as this keeps things stable.
I agree it is still not time to migrate, but there are many advantages of newer Java versions, and depending on how the community develops it might be interesting for example to use the module system (this is not possible until our dependencies do so).
My motivation for Junit 5 is more to essentially review the entire code base before getting more active on Jannovar development again. This will not have any immediate advantage, but will also not have any disadvantage :-0.
I'd strongly suggest to stay away from major changes in the code basis and its dependencies.
If we can just version bump to a new JUnit and easily adjust the existing tests then IMO that's fine.
I'd rather not make the move forward to Java 9+ as by my understanding this starts a dependency journey on the currently maintained Java releases...
see above: I agree it is still not time to migrate,
Still, I do not think that we can stick with Java 8 forever, it is inevitable that it will not be maintained well and sooner or later it would be like trying to run Java 1.5 code on the latest computer you just installed (https://www.oracle.com/java/technologies/java-se-support-roadmap.html). We are not there yet, though, I agree!
FWIW, adoptopenjdk will provide Java 8 support until May 2026 or later:
However, JUNIT supports Java 8 at run and compile time. So we can move forward here IMO.