[ https://issues.apache.org/jira/browse/MAPREDUCE-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862533#action_12862533 ]
Vinay Kumar Thota commented on MAPREDUCE-1730: ---------------------------------------------- {noformat} int count = 0; while (jInfo.getStatus().getRunState() != JobStatus.RUNNING) { UtilsForTests.waitFor(10000); count++; jInfo = wovenClient.getJobInfo(jobID); //If the count goes more than 100 seconds, then fail; This is to //avoid infinite loop if (count > 10) { Assert.fail("Since the job has not started even after" + " 100 seconds, failing at this point"); } } For above functionality can use the below statement. clsuster.isJobStarted(jobID); -> this method is available in the MRCluster. {noformat} {noformat} JobInfo jobInfo = cluster.getJTClient().getProxy() .getJobInfo(jobID); Assert.assertNotNull("The Job information is not present ", jobInfo); Why are your checking the jobInfo second time? is there any reason behind it? Already checking the jobinfo in the top whether its null or not.In that case, why do you need the second time checking? {noformat} {noformat} Assert.assertNull("The Job information is not present ", jobInfo); The message in Assert statement might be wrong, because after completion of job the information should be null right.So you are checking the assertNull condition and its correct.But the message is not correct. If jobinfo available after completion of job, it should fail and shows the message saying that 'Job information is still available after completion of job'. {noformat} > Automate test scenario for successful/killed jobs' memory is properly removed > from jobtracker after these jobs retire. > ---------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-1730 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-1730 > Project: Hadoop Map/Reduce > Issue Type: Test > Affects Versions: 0.22.0 > Reporter: Iyappan Srinivasan > Fix For: 0.22.0 > > Attachments: TestRetiredJobs.patch > > > Automate using herriot framework, test scenario for successful/killed jobs' > memory is properly removed from jobtracker after these jobs retire. > This should test when successful and failed jobs are retired, their > jobInProgress object are removed properly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.