api-ffmpeg integration tests are flaky
Describe the bug During CI, the JDK 14 test sometimes fails, with errors that look like:
[INFO]
[INFO] Results:
[INFO]
Error: Failures:
Error: VideoFileInputOutputIT.testRipKlv:183->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error: VideoFileInputOutputIT.testSimple:101 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error: VideoFileInputOutputIT.testWithData:122->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
Error: VideoFileInputOutputIT.testWithDataH265:152->createFile:294 » NoClassDefFound Could not initialize class org.bytedeco.ffmpeg.global.swscale
[INFO]
Error: Tests run: 9, Failures: 4, Errors: 0, Skipped: 0
An example is at https://github.com/WestRidgeSystems/jmisb/runs/6536608638?check_suite_focus=true
The logs contain:
Debug: Locking /home/runner/.javacpp/cache before extracting
Debug: Failed to extract for jniswscale: java.lang.UnsatisfiedLinkError: java.nio.channels.FileLockInterruptionException
Possibly this is a race in some of our tests where we're calling Thread.interrupt() at the wrong time. However I'm only seeing that in a shutdown method.
To Reproduce I can't reproduce this locally on JDK 11. Possibly JDK 14 is needed.
Expected behavior Stable tests.
Screenshots N/A
Configuration (please complete the following information):
- Happens on JDK 14 on Github actions.
Additional context Add any other context about the problem here.
I wonder if we should update that to use JDK 17, since 14 was one of those releases that only got 6 months of support (which has now ended)?
I just tried running the failsafe tests locally a few times with an Oracle 17.0.3 JVM and didn't see anything.
Unless you have a need for 14, I'll probably just go ahead and update to 17, then we can see if the problem persists.
I've added the PR for JDK 17, but also note that we had the same failure on JDK 11 at https://github.com/WestRidgeSystems/jmisb/runs/6634860480?check_suite_focus=true
So while the JDK 14 -> JDK 17 change is worth doing, its not sufficient to resolve this problem.
Just had another JDK11 failure, so not JDK 14 specific.