[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862553#action_12862553
 ] 

Vinay Kumar Thota commented on MAPREDUCE-1741:
----------------------------------------------

{noformat}
Test names are bit confusing for me. Can you please change to some appropriate 
names? 
 Here is my suggestion.
testRetiredJobsCompletedLocation() - > testRetiredJobsHistoryLocation()
testRetiredMultipleJobsCompletedLocation() -> 
testRetiredMultipleJobsHistoryLocation()
{noformat}

{noformat}
String hadoopLogDirString = jconf.get("hadoop.log.dir");
jobHistoryDonePathString = 
jconf.get("mapred.job.tracker.history.completed.location");
String jobHistoryPathString = jconf.get("hadoop.job.history.location");

Can please check the above three statements with assert condition. Otherwise if 
any of these attributes are not available in the configuration 
then test fails w/ NPE w/out any message. So please check the above three 
values before proceeding to further steps
{noformat}


{noformat}
Assert.assertTrue("jobFileFound is false", jobFileFound);

You are checking the above condition while running the job right, in this case 
the above statement would be wrong because 
the jobFileFound should be false and it should be like below.

Assert.assertFalse("Job history files available in history location for running 
job itself.",jobFileFound)
{noformat}


How do you confirm whether its moved to retired job state or not after 
completion of job ?
I don't see any specific condition in the code for retire job. Is there any 
default interval available in the configuration for moving jobs to retire? 

{noformat}
Put the assert statement like below after completion of job.So that user will 
have clear information whenever test fails.
Assert.assertTrue("Job history files are not available in history location 
after job retired.", jobFileFound);
{noformat}

Even I have same question that Balaji has asked regarding creating 1000 files 
in done location. Can you please
elaborate more on this in your comments.

Can you please put the annotation @Test after java doc comments instead of top.




> Automate the test scenario of  job related files are moved from history 
> directory to done directory
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1741
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1741
>             Project: Hadoop Map/Reduce
>          Issue Type: Test
>          Components: test
>    Affects Versions: 0.22.0
>            Reporter: Iyappan Srinivasan
>             Fix For: 0.22.0
>
>         Attachments: TestJobHistoryLocation.patch
>
>
> Job related files are moved from history directory to done directory, when
> 1) Job succeeds
> 2) Job is killed
> 3) When 100 files are put in the done directory
> 4) When multiple jobs are completed at the same time, some successful, some 
> failed.
> Also, two files, conf.xml and job files should be present in the done 
> directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to