Trevor Robinson created HDFS-4115:
-------------------------------------

             Summary: TestHDFSCLI.testAll fails one test due to number format
                 Key: HDFS-4115
                 URL: https://issues.apache.org/jira/browse/HDFS-4115
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: test
         Environment: Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/j2sdk1.6-oracle/jre
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "3.2.0-32-generic", arch: "amd64", family: "unix"
            Reporter: Trevor Robinson


This test fails repeatedly on only one of my machines:

{noformat}
Failed tests:   testAll(org.apache.hadoop.cli.TestHDFSCLI): One of the tests 
failed. See the Detailed results to identify the command that failed

           Test ID: [587]
  Test Description: [report: Displays the report about the Datanodes]
     Test Commands: [-fs hdfs://localhost:35254 -report]
        Comparator: [RegexpComparator]
Comparision result:   [fail]
   Expected output:   [Configured Capacity: [0-9]+ \([0-9]+\.[0-9]+ [BKMGT]+\)]
     Actual output:   [Configured Capacity: 472446337024 (440 GB)
{noformat}

The problem appears to be that {{StringUtils.byteDesc}} calls 
{{limitDecimalTo2}} which calls {{DecimalFormat.format}} with a pattern of 
{{#.##}}. This pattern does not include trailing zeroes, so the expected regex 
is incorrect in requiring a decimal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to