Add java 21 variant to GitHub actions build
Failed for 2.1 build, switched to 3.1
Failed on 2.1 branch with build errors in the VFS ClassLoader. On the 3.1 branch it's failing on Key.java.
I fixed some of the errors in 99e7ecd. Currently at the point where tests using PowerMock are failing. I think PowerMock might need to be ripped out at this point.
Currently at the point where tests using PowerMock are failing. I think PowerMock might need to be ripped out at this point.
What problem is powermock causing w/ jdk21? Like does it cause unit test to fail or a maven plugin to fail.
Currently at the point where tests using PowerMock are failing. I think PowerMock might need to be ripped out at this point.
What problem is powermock causing w/ jdk21? Like does it cause unit test to fail or a maven plugin to fail.
[ERROR] org.apache.accumulo.coordinator.CompactionCoordinatorTest.testCoordinatorColdStartNoCompactions -- Time elapsed: 1.460 s <<< ERROR!
java.lang.IllegalStateException: Failed to transform class with name org.apache.accumulo.coordinator.CompactionCoordinatorTest$TestCoordinator. Reason: Cannot read field "string" because "utf" is null
at org.powermock.core.classloader.javassist.JavassistMockClassLoader.defineAndTransformClass(JavassistMockClassLoader.java:119)
at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:174)
at org.powermock.core.classloader.MockClassLoader.loadClassByThisClassLoader(MockClassLoader.java:102)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass1(DeferSupportingClassLoader.java:147)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:98)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:421)
at java.base/java.lang.Class.forName(Class.java:412)
at javassist.runtime.Desc.getClassObject(Desc.java:72)
at javassist.runtime.Desc.getClassType(Desc.java:181)
at javassist.runtime.Desc.getType(Desc.java:151)
at javassist.runtime.Desc.getType(Desc.java:107)
at org.apache.accumulo.coordinator.CompactionCoordinatorTest.testCoordinatorColdStartNoCompactions(CompactionCoordinatorTest.java:231)
Looking at the PowerMock mailing list and GitHub, I think it might be dead. Last commit back in Feb 2022, last release in 2020.
Looking at the PowerMock mailing list and GitHub, I think it might be dead. Last commit back in Feb 2022, last release in 2020.
That is a good find from trying to build with 21
PowerMock is used to in 2 places, the unit tests for the Compactor and CompactionCoordinator. I wonder if we can just delete these unit tests, we have coverage on their functionality in the ITs.
Mockito may also be an alternative.
Mockito may also be an alternative.
I looked at their site and mailing list and did not get a good feel that it would work with Java 21 at this point either.
Created #3817 to discuss removing the tests and PowerMock.
I'm wondering if we should just close this PR and punt on Java 21 source compatibility for now.
I'm wondering if we should just close this PR and punt on Java 21 source compatibility for now.
Can just leave it open until we work through the issues. No need to close it. It's useful to track the status.
I'm wondering if we should just close this PR and punt on Java 21 source compatibility for now.
It feels like this JDK version has improved the static analysis it does, so maybe there is some benefit to running it as part of the build.