Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1239

TestCLI: make ports optional in regex comparators

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: tests
    • Labels:
      None

      Description

      The following is seen in a multi-node configuration in HA:

      14/03/03 19:32:40 INFO cli.CLITestHelper: -------------------------------------------
      14/03/03 19:32:40 INFO cli.CLITestHelper:                     Test ID: [256]
      14/03/03 19:32:40 INFO cli.CLITestHelper:            Test Description: [mkdir: Test for NAMENODE path - creating a directory with the name of an already existing directory]
      14/03/03 19:32:40 INFO cli.CLITestHelper: 
      14/03/03 19:32:40 INFO cli.CLITestHelper:               Test Commands: [-fs hdfs://myCluster -mkdir hdfs://myCluster/tmp/testcli_1393903659798/dir0]
      14/03/03 19:32:40 INFO cli.CLITestHelper:               Test Commands: [-fs hdfs://myCluster -mkdir hdfs://myCluster/tmp/testcli_1393903659798/dir0]
      14/03/03 19:32:40 INFO cli.CLITestHelper: 
      14/03/03 19:32:40 INFO cli.CLITestHelper:            Cleanup Commands: [-fs hdfs://myCluster -rm -r hdfs://myCluster/tmp/testcli_1393903659798/dir0]
      14/03/03 19:32:40 INFO cli.CLITestHelper: 
      14/03/03 19:32:40 INFO cli.CLITestHelper:                  Comparator: [RegexpComparator]
      14/03/03 19:32:40 INFO cli.CLITestHelper:          Comparision result:   [fail]
      14/03/03 19:32:40 INFO cli.CLITestHelper:             Expected output:   [mkdir: `hdfs://\w+[-.a-z0-9]*:[0-9]+/tmp/testcli_1393903659798/dir0': File exists]
      14/03/03 19:32:40 INFO cli.CLITestHelper:               Actual output:   [mkdir: `hdfs://myCluster/tmp/testcli_1393903659798/dir0': File exists
      ]
      14/03/03 19:32:40 INFO cli.CLITestHelper: 

      A couple dozen other tests fail for the same reason.

      1. BIGTOP-1239.patch
        11 kB
        Dasha Boudnik
      2. BIGTOP-1239.patch
        11 kB
        Dasha Boudnik

        Activity

        Hide
        cos Konstantin Boudnik added a comment -

        Committed to the master. Thanks Dasha!

        Show
        cos Konstantin Boudnik added a comment - Committed to the master. Thanks Dasha!
        Hide
        cos Konstantin Boudnik added a comment -

        ok, now it seems to be working properly. +1
        Committing it now

        Show
        cos Konstantin Boudnik added a comment - ok, now it seems to be working properly. +1 Committing it now
        Hide
        dasha.boudnik Dasha Boudnik added a comment - - edited

        Thank you – fixed!

        Show
        dasha.boudnik Dasha Boudnik added a comment - - edited Thank you – fixed!
        Hide
        cos Konstantin Boudnik added a comment -

        Actually, I take it back. The change in the regexp isn't equivalent. Here's why:

        • the change goes fro/to
          hdfs://\w+[-.a-z0-9]*:[0-9]+
          hdfs://\w+[-.a-z0-9]*[:[0-9]]?+
          

          and that changes the semantic of the expression. The '+' sign should be inside. And I think you'd be better off by using '(' and ')' instead of the square brackets. So, final regexp should be something like

          hdfs://\w+[-.a-z0-9]*(:[0-9]+)?
          

          Otherwise the patch is good

        Show
        cos Konstantin Boudnik added a comment - Actually, I take it back. The change in the regexp isn't equivalent. Here's why: the change goes fro/to hdfs://\w+[-.a-z0-9]*:[0-9]+ hdfs://\w+[-.a-z0-9]*[:[0-9]]?+ and that changes the semantic of the expression. The '+' sign should be inside. And I think you'd be better off by using '(' and ')' instead of the square brackets. So, final regexp should be something like hdfs://\w+[-.a-z0-9]*(:[0-9]+)? Otherwise the patch is good
        Hide
        cos Konstantin Boudnik added a comment -

        I am running this patch on 2.0.3 based Hadoop cluster (Bigtop 0.7.0 release) and everything looks fine. I don't see extra failing tests you've mentioned, so from the master perspective there are no issues. I still see BIGTOP-997 as before, but it will be addressed separately.

        +1 on the patch, I will commit it shortly.

        Show
        cos Konstantin Boudnik added a comment - I am running this patch on 2.0.3 based Hadoop cluster (Bigtop 0.7.0 release) and everything looks fine. I don't see extra failing tests you've mentioned, so from the master perspective there are no issues. I still see BIGTOP-997 as before, but it will be addressed separately. +1 on the patch, I will commit it shortly.
        Hide
        dasha.boudnik Dasha Boudnik added a comment -

        There are still two failing tests – id 242 and 258, but those are unrelated, so we'll probably need another JIRA.

        Handed off to Konstantin Boudnik – thanks!

        Show
        dasha.boudnik Dasha Boudnik added a comment - There are still two failing tests – id 242 and 258, but those are unrelated, so we'll probably need another JIRA. Handed off to Konstantin Boudnik – thanks!

          People

          • Assignee:
            dasha.boudnik Dasha Boudnik
            Reporter:
            dasha.boudnik Dasha Boudnik
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development