hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kanter (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-4924) flakey test: org.apache.hadoop.mapred.TestClusterMRNotification.testMR
Date Tue, 08 Jan 2013 01:38:12 GMT
Robert Kanter created MAPREDUCE-4924:
----------------------------------------

             Summary: flakey test: org.apache.hadoop.mapred.TestClusterMRNotification.testMR
                 Key: MAPREDUCE-4924
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4924
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: mrv1
    Affects Versions: 2.0.2-alpha
            Reporter: Robert Kanter
            Priority: Trivial


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

{code}
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)
	...
{code}

It looks like a race condition:
{code}
    // 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);
{code}
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.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message