0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/sharding/map_reduce_validation.js

14 lines
458 B
JavaScript

var st = new ShardingTest({ shards: 1 });
var testDB = st.s.getDB('test');
var mapFunc = function() { emit(this.x, 1); };
var reduceFunc = function(key, values) { return values.length; };
assert.commandFailed(testDB.runCommand({ mapReduce: 'user',
map: mapFunc,
reduce: reduceFunc,
out: { inline: 1, sharded: true }}));
st.stop();