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/01/12 18:17:56 UTC

[GitHub] [kafka] mimaison opened a new pull request #11674: KAFKA-13577: Replace easymock with mockito in kafka:core - part 3

mimaison opened a new pull request #11674:
URL: https://github.com/apache/kafka/pull/11674


   Follow up from https://github.com/apache/kafka/pull/11672 and https://github.com/apache/kafka/pull/11673
   
   ### 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] tombentley commented on a change in pull request #11674: KAFKA-13577: Replace easymock with mockito in kafka:core - part 3

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



##########
File path: core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
##########
@@ -82,44 +82,43 @@ import org.apache.kafka.common.security.auth.{KafkaPrincipal, KafkaPrincipalSerd
 import org.apache.kafka.common.utils.{ProducerIdAndEpoch, SecurityUtils, Utils}
 import org.apache.kafka.common.{ElectionType, IsolationLevel, Node, TopicIdPartition, TopicPartition, Uuid}
 import org.apache.kafka.server.authorizer.{Action, AuthorizationResult, Authorizer}
-import org.easymock.EasyMock._
-import org.easymock.{Capture, EasyMock, IAnswer}
 import org.junit.jupiter.api.Assertions._
 import org.junit.jupiter.api.{AfterEach, Test}
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.ValueSource
-import org.mockito.{ArgumentMatchers, Mockito}
+import org.mockito.ArgumentMatchers.{any, anyBoolean, anyDouble, anyInt, anyLong, anyShort, anyString, argThat, isNotNull}

Review comment:
       Any reason not to import `eq`. There are call sites which mix `ArgumentMatchers` qualified and unqualified forms.




-- 
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] mimaison commented on a change in pull request #11674: KAFKA-13577: Replace easymock with mockito in kafka:core - part 3

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



##########
File path: core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
##########
@@ -82,44 +82,43 @@ import org.apache.kafka.common.security.auth.{KafkaPrincipal, KafkaPrincipalSerd
 import org.apache.kafka.common.utils.{ProducerIdAndEpoch, SecurityUtils, Utils}
 import org.apache.kafka.common.{ElectionType, IsolationLevel, Node, TopicIdPartition, TopicPartition, Uuid}
 import org.apache.kafka.server.authorizer.{Action, AuthorizationResult, Authorizer}
-import org.easymock.EasyMock._
-import org.easymock.{Capture, EasyMock, IAnswer}
 import org.junit.jupiter.api.Assertions._
 import org.junit.jupiter.api.{AfterEach, Test}
 import org.junit.jupiter.params.ParameterizedTest
 import org.junit.jupiter.params.provider.ValueSource
-import org.mockito.{ArgumentMatchers, Mockito}
+import org.mockito.ArgumentMatchers.{any, anyBoolean, anyDouble, anyInt, anyLong, anyShort, anyString, argThat, isNotNull}

Review comment:
       In Scala `eq` is an operator. I guess we could import it with a rename but we seem to use `ArgumentMatchers.eq()` in most (all?) other files, so I used that here too.




-- 
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] mimaison merged pull request #11674: KAFKA-13577: Replace easymock with mockito in kafka:core - part 3

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


   


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