[ 
https://issues.apache.org/jira/browse/HBASE-11019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973651#comment-13973651
 ] 

Hadoop QA commented on HBASE-11019:
-----------------------------------

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12640706/11019-v1.txt
  against trunk revision .
  ATTACHMENT ID: 12640706

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:green}+1 tests included{color}.  The patch appears to include 3 new 
or modified tests.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

    {color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9323//console

This message is automatically generated.

> incCount() method should be properly stubbed in 
> HConnectionTestingUtility#getMockedConnectionAndDecorate()
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11019
>                 URL: https://issues.apache.org/jira/browse/HBASE-11019
>             Project: HBase
>          Issue Type: Test
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: 11019-v1.txt
>
>
> From 
> https://builds.apache.org/job/PreCommit-HBASE-Build/9306//testReport/org.apache.hadoop.hbase.master/TestAssignmentManager/testClosingFailureDuringRecovery/
>  :
> {code}
> org.mockito.exceptions.base.MockitoException: 
> 'incCount' is a *void method* and it *cannot* be stubbed with a *return 
> value*!
> Voids are usually stubbed with Throwables:
>     doThrow(exception).when(mock).someVoidMethod();
> ***
> If you're unsure why you're getting above error read on.
> Due to the nature of the syntax above problem might occur because:
> 1. The method you are trying to stub is *overloaded*. Make sure you are 
> calling the right overloaded version.
> 2. Somewhere in your test you are stubbing *final methods*. Sorry, Mockito 
> does not verify/stub final methods.
> 3. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub 
> spies - 
>    - with doReturn|Throw() family of methods. More in javadocs for 
> Mockito.spy() method.
>       at 
> org.apache.hadoop.hbase.client.HConnectionTestingUtility.getMockedConnectionAndDecorate(HConnectionTestingUtility.java:124)
>       at 
> org.apache.hadoop.hbase.master.TestAssignmentManager.setUpMockedAssignmentManager(TestAssignmentManager.java:1141)
>       at 
> org.apache.hadoop.hbase.master.TestAssignmentManager.testClosingFailureDuringRecovery(TestAssignmentManager.java:1027)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> {code}
> incCount() should be properly stubbed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to