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

flakey test: org.apache.hadoop.mapred.TestClusterMRNotification.testMR

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 1.2.0, 2.0.3-alpha
    • Component/s: mrv1
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I occasionally get a failure like this on org.apache.hadoop.mapred.TestClusterMRNotification.testMR

      junit.framework.AssertionFailedError: expected:<6> but was:<4>
      	at junit.framework.Assert.fail(Assert.java:47)
      	at junit.framework.Assert.failNotEquals(Assert.java:283)
      	at junit.framework.Assert.assertEquals(Assert.java:64)
      	at junit.framework.Assert.assertEquals(Assert.java:195)
      	at junit.framework.Assert.assertEquals(Assert.java:201)
      	at org.apache.hadoop.mapred.NotificationTestCase.testMR(NotificationTestCase.java:184)
      	...
      

      It looks like a race condition:

          // run a job with FAILED status
          System.out.println(UtilsForTests.runJobFail(this.createJobConf(), inDir,
                                                      outDir).getID());
          Thread.sleep(2000);
          assertEquals(6, NotificationServlet.counter);
          assertEquals(0, NotificationServlet.failureCounter);
      

      Instead of sleeping for 2 seconds, we should keep checking the counter and fail after a timeout. There's a couple of similar places in the test that should be fixed too.

      1. MAPREDUCE-4924_branch-1.patch
        2 kB
        Robert Kanter
      2. MAPREDUCE-4924_branch-1.patch
        2 kB
        Robert Kanter
      3. MAPREDUCE-4924.patch
        3 kB
        Robert Kanter
      4. MAPREDUCE-4924.patch
        2 kB
        Robert Kanter

        Activity

        Robert Kanter created issue -
        Robert Kanter made changes -
        Field Original Value New Value
        Assignee Robert Kanter [ rkanter ]
        Robert Kanter made changes -
        Attachment MAPREDUCE-4924_branch-1.patch [ 12563844 ]
        Attachment MAPREDUCE-4924.patch [ 12563845 ]
        Robert Kanter made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Robert Kanter made changes -
        Attachment MAPREDUCE-4924_branch-1.patch [ 12565018 ]
        Attachment MAPREDUCE-4924.patch [ 12565019 ]
        Alejandro Abdelnur made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 1.2.0 [ 12321661 ]
        Fix Version/s 2.0.3-alpha [ 12323275 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robert Kanter
            Reporter:
            Robert Kanter
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development