Skip to content

Conversation

@nicoloboschi
Copy link
Contributor

@nicoloboschi nicoloboschi commented Feb 11, 2022

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-testng artifact (and in turn powermock-core) since it's not used anymore.
The only artifact that doesn't have a simple replace path is powermock-reflect which 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

  • Replaced PowerMockito with Mockito classes (just changing the packages)
  • Replaced PowerMockito constructor mock with Mockito MockedConstruction feature.
  • Removed the module powermock-module-testng in favor of powermock-reflect

Documentation

  • no-need-doc

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 11, 2022
Copy link
Contributor

@eolivelli eolivelli left a 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

Copy link
Contributor

@eolivelli eolivelli left a 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

@nicoloboschi
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@nicoloboschi
Copy link
Contributor Author

@eolivelli CI is green

@nicoloboschi
Copy link
Contributor Author

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@eolivelli eolivelli merged commit dc602c0 into apache:master Feb 12, 2022
@codelipenghui codelipenghui added this to the 2.10.0 milestone Apr 19, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants