diff options
Diffstat (limited to 'jstests/sharding/query_config.js')
-rw-r--r-- | jstests/sharding/query_config.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/jstests/sharding/query_config.js b/jstests/sharding/query_config.js index 4b0761790d4..cb3387a8068 100644 --- a/jstests/sharding/query_config.js +++ b/jstests/sharding/query_config.js @@ -233,22 +233,6 @@ // Distinct query. assert.eq(configDB.chunks.distinct("shard").sort(), [shard1, shard2]); - // Group query. - result = configDB.chunks.group({ - key: {shard: 1}, - cond: {ns: testColl.getFullName()}, - reduce: function(curr, res) { - res.chunks++; - }, - initial: {chunks: 0}, - finalize: function(res) { - res._id = res.shard; - } - }); - assert.eq( - sortArrayById(result), - [{shard: shard1, chunks: 2, _id: shard1}, {shard: shard2, chunks: 3, _id: shard2}]); - // Map reduce query. var mapFunction = function() { if (this.ns == "test2.testColl") { @@ -343,20 +327,6 @@ // Distinct query. assert.eq(userColl.distinct("g").sort(), [1, 2, 3]); - // Group query. - result = userColl.group({ - key: {g: 1}, - reduce: function(curr, res) { - res.prod *= curr.c; - }, - initial: {prod: 1}, - finalize: function(res) { - res._id = res.g; - } - }); - assert.eq(sortArrayById(result), - [{g: 1, prod: 20, _id: 1}, {g: 2, prod: 288, _id: 2}, {g: 3, prod: 22, _id: 3}]); - // Map reduce query. var mapFunction = function() { emit(this.g, 1); |