Skip to content

Commit 14d72f0

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 3289efe commit 14d72f0

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
@@ -150,6 +150,7 @@ public void testMapReduceWithOutputToAnotherDatabase() {
150150
MapReduceCommand.OutputType.REPLACE,
151151
new BasicDBObject());
152152
command.setOutputDB(MR_DATABASE);
153+
getClient().getDatabase(MR_DATABASE).createCollection(DEFAULT_COLLECTION);
153154
MapReduceOutput output = collection.mapReduce(command);
154155

155156
@SuppressWarnings("deprecation")

0 commit comments

Comments
 (0)