[
https://issues.apache.org/jira/browse/HDFS-3717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421794#comment-13421794
]
Andrew Wang commented on HDFS-3717:
-----------------------------------
One note here is that HDFS-3711 uses a small, non-zero value for {{DELTA}}, not
0.0. I chose this because floating point values can vary slightly based on the
order of supposedly commutative operations, so doing a straight equality
comparison often won't work.
> Test cases in TestPBHelper fail
> -------------------------------
>
> Key: HDFS-3717
> URL: https://issues.apache.org/jira/browse/HDFS-3717
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.0.1-alpha
> Reporter: Kihwal Lee
> Assignee: Kihwal Lee
> Fix For: 3.0.0, 2.2.0-alpha
>
> Attachments: hdfs-3717.patch.txt
>
>
> {{org.apache.hadoop.hdfs.protocolPB.TestPBHelper.testConvertBlockCommand}}
> {{org.apache.hadoop.hdfs.protocolPB.TestPBHelper.testConvertLocatedBlock}}
> {{org.apache.hadoop.hdfs.protocolPB.TestPBHelper.testConvertRecoveringBlock}}
> They all fail with:
> {noformat}
> java.lang.AssertionError: Use assertEquals(expected, actual, delta)
> to compare floating-point numbers
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira