Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.0.0-alpha
-
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.