Closed mohitkira closed 9 months ago
Unfortunately your dependency tree and a some annotations in text are not really actionable. CGLIB doesn't process private or final methods so it's a bit unclear why it used to work before.
Powermock is know to be problematic on Java 17. Given it works with 11, it's unclear how that relates to Spring and we'd need a small sample we can run ourselves to move forward. You can attach a zip to this issue or push the code to a GitHub repository.
Let me work on creating small sample. Do you know why test case work when run as single test case but fails when run as test suite(with multiple classes)?
Do you see any dependency conflicting which might be causing the issue? Dependency tree : pastebin.com/qmy0x0nD
We are working on migrating the application from jdk11 to jdk17. Test case is working find with JDK11 and spring 5.3 As we have to mock final static method we are using powermockrunner. We are using PowerMockito.mockStatic to mock the static class.
If I run the single test case it works fine. But when I run it as a test suite with entire project/multiple case, it fails.
Services are moving fine on tomcat server but junit test case is failing. with below error :
Below is the pom file.
Below is the annotation we are using on the test class:
Everything works fine with JDK11 but throw issues with JDK17.
Maven Dependency tree : pastebin.com/qmy0x0nD