-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[test] remove PowerMockito from the classpath and replace the usages with Mockito #14250
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
[test] remove PowerMockito from the classpath and replace the usages with Mockito #14250
Conversation
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm as far as CI passes.
Please note that this patch will make it harder to cherry pick patches.
Please take into consideration a port to at least branch 2.9 and 2.8
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting state into 'requested change' until CI passes
|
/pulsarbot rerun-failure-checks |
|
@eolivelli CI is green |
lhotari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Motivation
PowerMockito (mockito extension built on PowerMock) can be totally replaced with Mockito.
In this way we can remove the dependency
powermock-api-mockito2.We can also remove
powermock-module-testngartifact (and in turnpowermock-core) since it's not used anymore.The only artifact that doesn't have a simple replace path is
powermock-reflectwhich will remain in the classpath.The main reason behind the PowerMock usage reduction is that the project is semi-abandoned and it can easily break with newer jdk versions.
Modifications
MockedConstructionfeature.powermock-module-testngin favor ofpowermock-reflectDocumentation
no-need-doc