[ https://issues.apache.org/jira/browse/HADOOP-6065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Allen Wittenauer resolved HADOOP-6065. -------------------------------------- Resolution: Incomplete Closing this as stale. > TestRunningTaskLimit doesnt work as expected > -------------------------------------------- > > Key: HADOOP-6065 > URL: https://issues.apache.org/jira/browse/HADOOP-6065 > Project: Hadoop Common > Issue Type: Bug > Components: test > Reporter: Amar Kamat > > I see the following code in TestRunningTaskLimit > {code} > JobConf jobConf = createWaitJobConf(mr, "job1", 20, 20); > jobConf.setRunningMapLimit(5); > jobConf.setRunningReduceLimit(3); > > // Submit the job > RunningJob rJob = (new JobClient(jobConf)).submitJob(jobConf); > > // Wait 20 seconds for it to start up > UtilsForTests.waitFor(20000); > > // Check the number of running tasks > JobTracker jobTracker = mr.getJobTrackerRunner().getJobTracker(); > JobInProgress jip = jobTracker.getJob(rJob.getID()); > assertEquals(5, jip.runningMaps()); > assertEquals(3, jip.runningReduces()); > {code} > This check is timing based and might not work as expected. Instead we can run > a job with > 5 maps (all waiting) and then wait for the job to reach a stable > state and then test if exactly 5 maps were scheduled or not. -- This message was sent by Atlassian JIRA (v6.2#6252)