Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4924

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

        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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: