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

E. Sammer commented on MRUNIT-9:
--------------------------------

Not sure how this one worked before. The iterator() method on 
InspectableIterable always invokes its baseIter's iterator() method and creates 
a new instance of InspectableIterator. If the for (x : i) construct invokes 
iterator() on i, you're always going to get a reset iterator and the failure 
I'm seeing[1].

[1] My description of the error is wrong. The actual failure is actually that 
the iterator doesn't reset and this code:

for (int v : i) {
  count += v;
}

for (int v : i) {
  count += v;
}

yields count == 8 if i contains 4 1s rather than 4.

> Fix failing testDoubleIteration test
> ------------------------------------
>
>                 Key: MRUNIT-9
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-9
>             Project: MRUnit
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: E. Sammer
>            Assignee: E. Sammer
>             Fix For: 0.5.0
>
>
> The testDoubleIteration() test in TestReduceDriver is failing due to an extra 
> null record in position 0 (rather than 1).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to