You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/09 15:58:13 UTC

[GitHub] [kafka] mimaison commented on a change in pull request #11167: Kafka-13158 Replace EasyMock and PowerMock with Mockito for ConnectClusterStateImpl Test and ConnectorPluginsResourceTest

mimaison commented on a change in pull request #11167:
URL: https://github.com/apache/kafka/pull/11167#discussion_r802807309



##########
File path: build.gradle
##########
@@ -2373,7 +2373,7 @@ project(':connect:runtime') {
     testImplementation libs.junitVintageEngine
     testImplementation libs.powermockJunit4
     testImplementation libs.powermockEasymock
-    testImplementation libs.mockitoCore
+    testImplementation libs.mockitoInline // supports mocking static methods, final classes, etc.

Review comment:
       Why are we switching to `mockitoInline`? We don't seem to use any of these feature in this PR and according to the Mockito project, inline may be removed in the future when all of its features are integrated in core.

##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResourceTest.java
##########
@@ -182,29 +174,24 @@
     @Mock
     private Plugins plugins;
     private ConnectorPluginsResource connectorPluginsResource;
+    @Captor

Review comment:
       We don't use these annotations in the other tests. Do you think we should not use them here to keep tests consistent? WDYT?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org