-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove PowerMock Dependency #6025
Comments
Note that PowerMock released a 2.0.0 version that addresses the JDK 12 issue. because of this, we don't need this as immediately, but will keep it open as there is still value in reducing dependencies. For example, if Mockito adds support for static methods, it would be nice to use only one mocking library going forward. |
We can remove the need for powermock for mocking classpath by using https://github.com/spring-projects/spring-boot/tree/b43827d6264a3eb4e9558c6e1dd7f89e537caa96/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/classpath |
Mockito has added support for static methods as of 3.4.0 https://github.com/mockito/mockito/releases/tag/v3.4.0 |
The tests are getting stuck when running a single test class and the mock is performed in a static variable inside an inner class Issue spring-projectsgh-6025
The tests are getting stuck when running a single test class and the mock is performed in a static variable inside an inner class Issue gh-6025
Powermock does not support JUnit5 yet, so we need to remove it to support JUnit 5. Additionally, maintaining additional libraries adds extra work for the team. Mockito now supports final classes and static method mocking. This commit replaces Powermock with mockito-inline. Closes spring-projectsgh-6025
The tests are getting stuck when running a single test class and the mock is performed in a static variable inside an inner class Issue spring-projectsgh-6025
PowerMock does not have a GA release that is compatible with JDK 12, nor is one currently planned.
Let's convert tests that are currently using PowerMock so that we can move forward with JDK 12.
The text was updated successfully, but these errors were encountered: