hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11818) TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails intermittently
Date Fri, 12 May 2017 23:43:04 GMT

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

Hudson commented on HDFS-11818:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11732 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/11732/])
HDFS-11818. TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails (jlowe: rev 2397a2626e22d002174f4a36891d713a7e1f1b20)
* (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java


> TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-11818
>                 URL: https://issues.apache.org/jira/browse/HDFS-11818
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha2, 2.8.2
>            Reporter: Eric Badger
>            Assignee: Nathan Roberts
>             Fix For: 2.9.0, 3.0.0-alpha3, 2.8.2
>
>         Attachments: HDFS-11818-branch-2.patch, HDFS-11818.patch
>
>
> Saw a weird Mockito failure in last night's build with the following stack trace:
> {noformat}
> org.mockito.exceptions.misusing.WrongTypeOfReturnValue: 
> INodeFile cannot be returned by isRunning()
> isRunning() should return boolean
> 	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.addBlockOnNodes(TestBlockManager.java:555)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.doTestSufficientlyReplBlocksUsesNewRack(TestBlockManager.java:404)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testSufficientlyReplBlocksUsesNewRack(TestBlockManager.java:397)
> {noformat}
> This is pretty confusing since we explicitly set isRunning() to return true in TestBlockManager's
\@Before method
> {noformat}
> 154    Mockito.doReturn(true).when(fsn).isRunning();
> {noformat}
> Also saw the following exception in the logs:
> {noformat}
> 2017-05-12 05:42:27,903 ERROR blockmanagement.BlockManager (BlockManager.java:run(2796))
- Error while processing replication queues async
> org.mockito.exceptions.base.MockitoException: 
> 'writeLockInterruptibly' 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 the method you are trying to stub is *overloaded* then make sure you are calling the
right overloaded version.
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.processMisReplicatesAsync(BlockManager.java:2841)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.access$100(BlockManager.java:120)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager$1.run(BlockManager.java:2792)
> {noformat}
> This is also weird since we don't do any explicit mocking with {{writeLockInterruptibly}}
via fsn in the test. It has to be something changing the mocks or non-thread safe access or
something like that. I can't explain the failures otherwise. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message