[ https://issues.apache.org/jira/browse/MRUNIT-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422359#comment-13422359 ]
Brock Noland commented on MRUNIT-64: ------------------------------------ Looks great! Just one item left... Below are some tests I think we should add and get passing. They are valid uses of the API prior to this change. I think the root of the problem is the addInput API behaves differently. Perhaps we should preserve it's behavior and then deprecate all APIs which do not conform to the new *all methods? TestMapDriver {code} @Test public void testWithBehaviorPriorToMRUNIT64() throws IOException { driver.withInput(new Text("foo"), new Text("bar")); driver.withOutput(new Text("foo"), new Text("bar")); driver.resetOutput(); driver.withInput(new Text("foo"), new Text("bar")); driver.withOutput(new Text("foo"), new Text("bar")); driver.runTest(); } @Test public void testAddBehaviorPriorToMRUNIT64() throws IOException { driver.addInput(new Text("foo"), new Text("bar")); driver.addOutput(new Text("foo"), new Text("bar")); driver.resetOutput(); driver.addInput(new Text("foo"), new Text("bar")); driver.addOutput(new Text("foo"), new Text("bar")); driver.runTest(); } {code} Test ReduceDriver {code} @Test public void testWithBehaviorPriorToMRUNIT64() throws IOException { List<LongWritable> values = new ArrayList<LongWritable>(); values.add(new LongWritable(1)); values.add(new LongWritable(2)); values.add(new LongWritable(3)); driver.withInput(new Pair<Text, List<LongWritable>>(new Text("foo"), values)); driver.withOutput(new Text("foo"), new LongWritable(6)); driver.runTest(); driver.resetOutput(); driver.withInput(new Pair<Text, List<LongWritable>>(new Text("foo"), values)); driver.withOutput(new Text("foo"), new LongWritable(6)); driver.runTest(); } @Test public void testAddBehaviorPriorToMRUNIT64() throws IOException { List<LongWritable> values = new ArrayList<LongWritable>(); values.add(new LongWritable(1)); values.add(new LongWritable(2)); values.add(new LongWritable(3)); driver.addInput(new Pair<Text, List<LongWritable>>(new Text("foo"), values)); driver.addOutput(new Text("foo"), new LongWritable(6)); driver.runTest(); driver.resetOutput(); driver.addInput(new Pair<Text, List<LongWritable>>(new Text("foo"), values)); driver.addOutput(new Text("foo"), new LongWritable(6)); driver.runTest(); } {code} > Multiple Input Key, Value Pairs should be supported > --------------------------------------------------- > > Key: MRUNIT-64 > URL: https://issues.apache.org/jira/browse/MRUNIT-64 > Project: MRUnit > Issue Type: Sub-task > Affects Versions: 0.8.1 > Reporter: Brock Noland > Assignee: James Kinley > Attachments: MRUNIT-64-v1.patch, MRUNIT-64.patch > > > The comments on MRUNIT-14 brought up a great point. The API today only allows > a single key value pair input. In many scenarios multiple inputs would be > useful. -- 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