Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4792

Unit Test TestJobTrackerRestartWithLostTracker fails with ant-1.8.4

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.0.4
    • Fix Version/s: 1.1.1
    • Component/s: test
    • Labels:
      None
    • Environment:

      fedora 17_64 x86

      Description

      Problem:
      JUnit tag @Ignore is not recognized since the testcase is JUnit3 and not JUnit4:
      Solution:
      Migrate the testcase to JUnit4, including:

      • Remove extends TestCase"
      • Remove import junit.framework.TestCase;
      • Add import org.junit.*;
      • Use appropriate annotations such as @After, @Before, @Test.

        Activity

        Amir Sanjar created issue -
        Hide
        Amir Sanjar added a comment -

        testcase is not in the trunk

        Show
        Amir Sanjar added a comment - testcase is not in the trunk
        Hide
        Amir Sanjar added a comment -

        tested with ant 1.7.x and 1.8.4

        Show
        Amir Sanjar added a comment - tested with ant 1.7.x and 1.8.4
        Amir Sanjar made changes -
        Field Original Value New Value
        Attachment MAPREDUCE-4792-branch-1.patch [ 12553344 ]
        Amir Sanjar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Target Version/s 1.0.4, 1.0.3 [ 12323325, 12320250 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12553344/MAPREDUCE-4792-branch-1.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/3025//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12553344/MAPREDUCE-4792-branch-1.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/3025//console This message is automatically generated.
        Amir Sanjar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Target Version/s 1.0.3, 1.0.4 [ 12320250, 12323325 ] 1.0.4, 1.0.3 [ 12323325, 12320250 ]
        Amir Sanjar made changes -
        Attachment MAPREDUCE-4792-branch-1.patch [ 12553499 ]
        Amir Sanjar made changes -
        Attachment MAPREDUCE-4792-branch-1.patch [ 12553344 ]
        Matt Foley made changes -
        Assignee Amir Sanjar [ asanjar ]
        Matt Foley made changes -
        Fix Version/s 1.1.1 [ 12321660 ]
        Fix Version/s 1.0.4 [ 12323325 ]
        Matt Foley made changes -
        Target Version/s 1.0.3, 1.0.4 [ 12320250, 12323325 ] 1.1.1 [ 12321660 ]
        Matt Foley made changes -
        Description Problem:
        JUnit tag @Ignore is not recognized since the testcase is JUnit3 and not JUnit4:
        Solution:
        Migrate the testcase to JUnit4
        How:

        Remove extends TestCase"

        SetUp and TearDown methods

        @Override
        protected void setUp() throws Exception { }

        replaced by:

        @Before
        public void setUp() throws Exception { }

        Same for tearDown():

        @Override
        protected void tearDown() throws Exception { }

        replaced by

        @After
        public void tearDown() throws Exception { }

        Imports

        The imports has to be reorganized:
        Remove import junit.framework.TestCase;
        Add org.junit.*; or import org.junit.After; import org.junit.Before; import org.junit.Test;
        Problem:
        JUnit tag @Ignore is not recognized since the testcase is JUnit3 and not JUnit4:
        Solution:
        Migrate the testcase to JUnit4, including:
        * Remove extends TestCase"
        * Remove import junit.framework.TestCase;
        * Add import org.junit.*;
        * Use appropriate annotations such as @After, @Before, @Test.
        Matt Foley made changes -
        Target Version/s 1.1.1 [ 12321660 ] 1.2.0 [ 12321661 ]
        Matt Foley made changes -
        Target Version/s 1.2.0 [ 12321661 ] 1.1.1 [ 12321660 ]
        Hide
        Matt Foley added a comment -

        Amir, the attached patch seems okay (although it would be fine to keep the "import org/junit/*" instead of adding all the specific cases).

        +1. Committed to branch-1 and branch-1.1.

        Show
        Matt Foley added a comment - Amir, the attached patch seems okay (although it would be fine to keep the "import org/junit/*" instead of adding all the specific cases). +1. Committed to branch-1 and branch-1.1.
        Matt Foley made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.1.1 [ 12321660 ]
        Resolution Fixed [ 1 ]
        Hide
        Matt Foley added a comment -

        Closed upon release of 1.1.1.

        Show
        Matt Foley added a comment - Closed upon release of 1.1.1.
        Matt Foley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        22m 6s 1 Amir Sanjar 13/Nov/12 19:08
        Patch Available Patch Available Open Open
        3h 20m 1 Amir Sanjar 13/Nov/12 22:28
        Open Open Resolved Resolved
        5d 7h 37m 1 Matt Foley 19/Nov/12 06:06
        Resolved Resolved Closed Closed
        14d 1h 27m 1 Matt Foley 03/Dec/12 07:33

          People

          • Assignee:
            Amir Sanjar
            Reporter:
            Amir Sanjar
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development