[ 
https://issues.apache.org/jira/browse/MRUNIT-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424815#comment-13424815
 ] 

Dave Beech commented on MRUNIT-126:
-----------------------------------

Thanks Bertrand. You are right, and I see your point, but for me the difference 
is that when you call run(), you are given the outputs as the return value 
which in effect says "here, now do something with this". So it's more obvious 
to the user what to do with the outputs than with the counters.  

A possible (but incompatible) change would be to wrap the outputs and counters 
together into an object called "TestResult" or "TestOutcome" which exposes the 
outputs and counters through getter methods. 

e.g. TestResult result = driver.withInput(...).withOutput(...).run();
List<Pair<K,V>> outputs = result.getOutputs();
Counters counters = result.getCounters();

Any thoughts?


                
> Counter tests are ignored if test is executed using run() rather than 
> runTest()
> -------------------------------------------------------------------------------
>
>                 Key: MRUNIT-126
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-126
>             Project: MRUnit
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Dave Beech
>
> An alternative way of running an mrunit test is to call run(), which returns 
> the output list to you for manual validation, rather than runTest() which 
> validates everything automatically. 
> If you run a test using the run() method, any counter tests you have 
> specified via withCounter(..) etc are silently ignored, which may falsely 
> give the impression that these tests have passed. 
> At the very least we should give a warning that this is happening. Otherwise, 
> we should make sure the counter validation is triggered in all cases. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to