You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "Terry Koch (JIRA)" <ji...@apache.org> on 2013/10/20 02:36:42 UTC

[jira] [Comment Edited] (MRUNIT-188) Throw assertion error if drivers are reused

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

Terry Koch edited comment on MRUNIT-188 at 10/20/13 12:36 AM:
--------------------------------------------------------------

Proposed fix:

1) Added a boolean to TestDriver to track whether a driver has been reused (ie has executed run() more than once).
2) Added a check and set to preRunChecks() in each of the drivers to either throw an exception if is is being reused or set the boolean to true for the first run().

Caveat - this patch still has my Javadoc alteration from JIRA 188 (sorry, my bad, n00b mistake) in MapDriverBase, which also has the preRunChecks() addition - I've since been taught how to avoid this in the future but will back out and redo changes if that's an issue.d


was (Author: terrykoch):
Proposed fix:

1) Added a boolean to TestDriver to determine whether a driver has been reused (ie has executed run() more than once).
2) Added a check and set to preRunChecks() in each of the drivers to either throw an exception if is is being reused or set the boolean.

Caveat - this patch still has my Javadoc alteration from JIRA 188 (sorry, my bad, n00b mistake) in MapDriverBase, which also has the preRunChecks() addition - I've since been taught how to avoid this in the future but will back out and redo changes if that's an issue.d

> Throw assertion error if drivers are reused
> -------------------------------------------
>
>                 Key: MRUNIT-188
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-188
>             Project: MRUnit
>          Issue Type: Bug
>            Reporter: Brock Noland
>            Assignee: Terry Koch
>            Priority: Blocker
>             Fix For: 1.1.0
>
>         Attachments: MRUNIT-188_v1.patch
>
>
> We should throw an assertion error if a driver.run method is called more than once. See MRUNIT-187 for more details.



--
This message was sent by Atlassian JIRA
(v6.1#6144)