[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-12-09 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

Thanks for Chris' hint: I had a stale .xml file in my conf/ directory. I've 
deleted it and now everything works Ok.
+1 patch looks good!

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-12-09 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

Interestingly enough but I'm seeing this problem only on BSD - Linux runs just 
fine...

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-12-04 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

Well, still fails on my BSD machine. The message is 
{noformat}
TestLostTaskTracker
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.791 sec
- Standard Output ---
2009-12-04 16:43:13,581 INFO  mapred.JobTracker (JobTracker.java:(1334)) 
- Starting jobtracker with owner as cos and supergroup as supergroup
2009-12-04 16:43:13,587 INFO  mapred.JobTracker 
(JobTracker.java:initializeTaskMemoryRelatedConfig(4086)) - Scheduler 
configured with (memSizeForMapSlotOnJT, memSizeForRedu
ceSlotOnJT, limitMaxMemForMapTasks, limitMaxMemForReduceTasks) (-1, -1, -1, -1)
2009-12-04 16:43:13,590 INFO  util.HostsFileReader 
(HostsFileReader.java:refresh(81)) - Refreshing hosts (include/exclude) list
2009-12-04 16:43:13,607 INFO  mapred.QueueConfigurationParser 
(QueueConfigurationParser.java:parseResource(170)) - Bad conf file: top-level 
element not 
-  ---

Testcase: testLostTaskTrackerCalledAfterExpiryTime took 0.763 sec
Caused an ERROR
No queues defined 
java.lang.RuntimeException: No queues defined 
at 
org.apache.hadoop.mapred.QueueConfigurationParser.parseResource(QueueConfigurationParser.java:171)
at 
org.apache.hadoop.mapred.QueueConfigurationParser.loadResource(QueueConfigurationParser.java:163)
at 
org.apache.hadoop.mapred.QueueConfigurationParser.(QueueConfigurationParser.java:92)
at 
org.apache.hadoop.mapred.QueueManager.getQueueConfigurationParser(QueueManager.java:126)
at org.apache.hadoop.mapred.QueueManager.(QueueManager.java:146)
at org.apache.hadoop.mapred.JobTracker.(JobTracker.java:1376)
at org.apache.hadoop.mapred.JobTracker.(JobTracker.java:1325)
at 
org.apache.hadoop.mapred.TestLostTaskTracker.setUp(TestLostTaskTracker.java:58)
{noformat}

The other problem: TestLostTaskTracker is JUnit v3 test (it extends TestCase, 
etc.). Please make it to be JUnit v4 (like the other two tests are).

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-12-03 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on MAPREDUCE-1050:
--

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12426134/MAPREDUCE-1050.patch
  against trunk revision 887044.

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 11 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/162/testReport/
Findbugs warnings: 
http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/162/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: 
http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/162/artifact/trunk/build/test/checkstyle-errors.html
Console output: 
http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/162/console

This message is automatically generated.

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-11-16 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

Another though on this: mockito jar is included into common configuration of 
ivy. Should it be included into 
test' config instead? 

Also, the needed modifications for {{.eclipse_template/.classpath is missed}}

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-11-05 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

I've checked the test failure on the original patch's version and see the same 
failure. Apparently, something has been changed in MR

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch, MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-11-03 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

On the other hand, having build modification + some test cases will allow to 
see immediately if Mockito works. So, I think with the patch as it is.

+1 on the patch. Let's have it.  

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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



[jira] Commented: (MAPREDUCE-1050) Introduce a mock object testing framework

2009-11-02 Thread Konstantin Boudnik (JIRA)

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

Konstantin Boudnik commented on MAPREDUCE-1050:
---

In order to move along with this new framework current patch (and JIRA) needs 
to be modified.
This JIRA is about adding new framework. Thus the patch needs to be focused on 
build's configuration and ivy modifications.
Then New JIRA needs to be opened for adding Mockito based unit tests.

Basically, the patch needs to be split in two.  

Same is true for HDFS-669

> Introduce a mock object testing framework
> -
>
> Key: MAPREDUCE-1050
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1050
> Project: Hadoop Map/Reduce
>  Issue Type: Test
>  Components: test
>Reporter: Tom White
>Assignee: Tom White
> Attachments: MAPREDUCE-1050.patch, MAPREDUCE-1050.patch, 
> MAPREDUCE-1050.patch
>
>
> Using mock objects in unit tests can improve code quality (see e.g. 
> http://www.mockobjects.com/). Hadoop would benefit from having a mock object 
> framework for developers to write unit tests with. Doing so will allow a 
> wider range of failure conditions to be tested and the tests will run faster.

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