Ensure collection exists prior to outputting mapReduce results to it
This works around a behavioral change in the 4.4 server's mapReduce
implementation on sharded clusters
@@ -150,6 +150,7 @@ public class MapReduceTest extends DatabaseTestCase {
MapReduceCommand.OutputType.REPLACE,
new BasicDBObject());
command.setOutputDB(MR_DATABASE);
+ getClient().getDatabase(MR_DATABASE).createCollection(DEFAULT_COLLECTION);
MapReduceOutput output = collection.mapReduce(command);
@SuppressWarnings("deprecation")
