Skip to content

Commit b8c5851

Browse files
committed
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 JAVA-3555
1 parent ecc8e23 commit b8c5851

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

driver-legacy/src/test/functional/com/mongodb/MapReduceTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public void testMapReduceWithOutputToAnotherDatabase() {
151151
MapReduceCommand.OutputType.REPLACE,
152152
new BasicDBObject());
153153
command.setOutputDB(MR_DATABASE);
154+
getClient().getDatabase(MR_DATABASE).createCollection(DEFAULT_COLLECTION);
154155
MapReduceOutput output = collection.mapReduce(command);
155156

156157

0 commit comments

Comments
 (0)