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 2021/07/17 19:12:21 UTC

[GitHub] [kafka] tang7526 opened a new pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

tang7526 opened a new pull request #11074:
URL: https://github.com/apache/kafka/pull/11074


   https://issues.apache.org/jira/browse/KAFKA-13101
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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



[GitHub] [kafka] ijuma commented on pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #11074:
URL: https://github.com/apache/kafka/pull/11074#issuecomment-913801179


   Tests passed for JDK 8, 11 and 17. Merging to master.


-- 
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



[GitHub] [kafka] tang7526 commented on pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
tang7526 commented on pull request #11074:
URL: https://github.com/apache/kafka/pull/11074#issuecomment-886132012


   > Thanks for the PR, we should also update https://github.com/apache/kafka/blob/trunk/build.gradle#L373
   
   @ijuma Copy that. Done.


-- 
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



[GitHub] [kafka] ijuma merged pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
ijuma merged pull request #11074:
URL: https://github.com/apache/kafka/pull/11074


   


-- 
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



[GitHub] [kafka] ijuma commented on pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #11074:
URL: https://github.com/apache/kafka/pull/11074#issuecomment-913801648


   cc @rhauch @kkonstantine 


-- 
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



[GitHub] [kafka] ijuma commented on pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #11074:
URL: https://github.com/apache/kafka/pull/11074#issuecomment-886113652


   Thanks for the PR, we should also update https://github.com/apache/kafka/blob/trunk/build.gradle#L373


-- 
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



[GitHub] [kafka] ijuma commented on a change in pull request #11074: KAFKA-13101: Replace EasyMock and PowerMock with Mockito for RestServerTest

Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #11074:
URL: https://github.com/apache/kafka/pull/11074#discussion_r702994755



##########
File path: connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/RestServerTest.java
##########
@@ -61,18 +56,23 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
 
-@RunWith(PowerMockRunner.class)
-@PowerMockIgnore({"javax.net.ssl.*", "javax.security.*", "javax.crypto.*"})
 public class RestServerTest {
-    @MockStrict
+    
     private Herder herder;
-    @MockStrict
     private Plugins plugins;
     private RestServer server;
 
     protected static final String KAFKA_CLUSTER_ID = "Xbafgnagvar";
 
+    @Before
+    public void tearUp() {

Review comment:
       This method is usually called `setUp()`.




-- 
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