You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/04/16 06:28:54 UTC

[GitHub] [incubator-hudi] xushiyan opened a new pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5

xushiyan opened a new pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5
URL: https://github.com/apache/incubator-hudi/pull/1521
 
 
   - Remove old mockito dependency
   - Add mockito-junit-jupiter
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5
URL: https://github.com/apache/incubator-hudi/pull/1521#discussion_r409315688
 
 

 ##########
 File path: hudi-hadoop-mr/src/test/java/org/apache/hudi/hadoop/realtime/TestHoodieRealtimeFileSplit.java
 ##########
 @@ -86,7 +78,7 @@ public void testWrite() throws IOException {
 
     // register expected method calls for void functions
     // so that we can verify what was called after the method call finishes
-    doNothing().when(out).writeByte(anyByte());
+    doNothing().when(out).writeByte(anyInt());
 
 Review comment:
   writeByte() actually takes an int.. so strict stubbing requires an int for this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5
URL: https://github.com/apache/incubator-hudi/pull/1521#discussion_r409317776
 
 

 ##########
 File path: hudi-hadoop-mr/src/test/java/org/apache/hudi/hadoop/realtime/TestHoodieRealtimeFileSplit.java
 ##########
 @@ -140,7 +132,7 @@ public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
 
       @Override
       public Void answer(InvocationOnMock invocation) throws Throwable {
-        byte[] bytes = invocation.getArgumentAt(0, byte[].class);
+        byte[] bytes = invocation.getArgument(0);
 
 Review comment:
   the new API refers getArgument()
   https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/invocation/InvocationOnMock.html#getArgument-int-

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5

Posted by GitBox <gi...@apache.org>.
xushiyan commented on a change in pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5
URL: https://github.com/apache/incubator-hudi/pull/1521#discussion_r409314065
 
 

 ##########
 File path: hudi-client/src/test/java/org/apache/hudi/index/TestHbaseIndex.java
 ##########
 @@ -70,9 +69,11 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.anyObject;
+import static org.mockito.ArgumentMatchers.any;
 
 Review comment:
   anyObject is deprecated... any is the alias

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] yanghua merged pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5

Posted by GitBox <gi...@apache.org>.
yanghua merged pull request #1521: [HUDI-798] Migrate to Mockito Jupiter for JUnit 5
URL: https://github.com/apache/incubator-hudi/pull/1521
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services