Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4115

TestHDFSCLI.testAll fails one test due to number format

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0-alpha
    • 3.0.0-alpha1
    • test
    • None
    • Reviewed

    Description

      This test fails repeatedly on only one of my machines:

      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)
      

      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.

      Attachments

        1. HDFS-4115.patch
          2 kB
          Trevor Robinson

        Activity

          People

            scurrilous Trevor Robinson
            scurrilous Trevor Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: