Closed melissalinkert closed 3 months ago
Discussed earlier today with @dgault and @melissalinkert, the current proposal offers a good compromise allowing to run the non-regression repository tests on JDK 21 without dropping support for JDK 8 yet and still testing file leaks.
To facilitate debugging and identification of the JDK used in a test run, we might want to update FormatReaderTestFactory.createInstances
to also print the Java version as an INFO level statement.
Java version should now be logged each time tests are run.
As suggested by @dgault, fafc56b picks a different file-leak-detector version based on the JDK version being used. The Ant build changes have been reverted so that file-leak-detector remains enabled. That seems to work locally - I can now both compile and run tests on both 8 and 21. Assuming it also works in the next 4 nightly builds in which it's included, that was easier than I expected and worth considering in the context of https://github.com/ome/ome-common-java/pull/72.
See discussion in #4158.
Not sure if there is a better way to do this (in particular, to exclude >= 21), but this should at least allow tests to run on Java 21 for now.