Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7947 Fix HDFS unit test failures on Windows
  3. HDFS-8310

Fix TestCLI.testAll 'help: help for find' on Windows

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      The test uses <RegexAcrossOutputComparator> in a single regex, which does not match on Windows as shown below.

      2015-04-30 01:14:01,737 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(155)) - -------------------------------------------
      2015-04-30 01:14:01,737 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(156)) -                     Test ID: [31]
      2015-04-30 01:14:01,737 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(157)) -            Test Description: [help: help for find]
      2015-04-30 01:14:01,737 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(158)) - 
      2015-04-30 01:14:01,738 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(162)) -               Test Commands: [-help find]
      2015-04-30 01:14:01,738 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(166)) - 
      2015-04-30 01:14:01,738 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(173)) - 
      2015-04-30 01:14:01,738 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(177)) -                  Comparator: [RegexpAcrossOutputComparator]
      2015-04-30 01:14:01,738 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(179)) -          Comparision result:   [fail]
      2015-04-30 01:14:01,739 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(181)) -             Expected output:   [-find <path> \.\.\. <expression> \.\.\. :
        Finds all files that match the specified expression and
        applies selected actions to them\. If no <path> is specified
        then defaults to the current working directory\. If no
        expression is specified then defaults to -print\.
        
        The following primary expressions are recognised:
          -name pattern
          -iname pattern
            Evaluates as true if the basename of the file matches the
            pattern using standard file system globbing\.
            If -iname is used then the match is case insensitive\.
        
          -print
          -print0
            Always evaluates to true. Causes the current pathname to be
            written to standard output followed by a newline. If the -print0
            expression is used then an ASCII NULL character is appended rather
            than a newline.
        
        The following operators are recognised:
          expression -a expression
          expression -and expression
          expression expression
            Logical AND operator for joining two expressions\. Returns
            true if both child expressions return true\. Implied by the
            juxtaposition of two expressions and so does not need to be
            explicitly specified\. The second expression will not be
            applied if the first fails\.
      ]
      2015-04-30 01:14:01,739 INFO  cli.CLITestHelper (CLITestHelper.java:displayResults(183)) -               Actual output:   [-find <path> ... <expression> ... :
        Finds all files that match the specified expression and
        applies selected actions to them. If no <path> is specified
        then defaults to the current working directory. If no
        expression is specified then defaults to -print.
        
        The following primary expressions are recognised:
          -name pattern
          -iname pattern
            Evaluates as true if the basename of the file matches the
            pattern using standard file system globbing.
            If -iname is used then the match is case insensitive.
        
          -print
          -print0
            Always evaluates to true. Causes the current pathname to be
            written to standard output followed by a newline. If the -print0
            expression is used then an ASCII NULL character is appended rather
            than a newline.
        
        The following operators are recognised:
          expression -a expression
          expression -and expression
          expression expression
            Logical AND operator for joining two expressions. Returns
            true if both child expressions return true. Implied by the
            juxtaposition of two expressions and so does not need to be
            explicitly specified. The second expression will not be
            applied if the first fails.
      ]
      

      Attachments

        1. HDFS-8310-001.patch
          1 kB
          Kiran Kumar M R
        2. HDFS-8310-002.patch
          1 kB
          Kiran Kumar M R

        Activity

          People

            kiranmr Kiran Kumar M R
            xyao Xiaoyu Yao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: