diff options
author | Kyle Suarez <kyle.suarez@mongodb.com> | 2018-05-25 15:24:17 -0400 |
---|---|---|
committer | Kyle Suarez <kyle.suarez@mongodb.com> | 2018-05-30 09:45:28 -0400 |
commit | 190fc58164d3076e1c3a72b7dcca8748dbe40d1f (patch) | |
tree | 5ad560c8a3f04618e455620dcf3ceae7d0811cd5 /jstests/sharding/features1.js | |
parent | 774af67d1d2115d9a89a45643b42e931bec9aa82 (diff) | |
download | mongo-190fc58164d3076e1c3a72b7dcca8748dbe40d1f.tar.gz |
SERVER-28524 remove group command
Users should use the aggregation $group stage instead.
Diffstat (limited to 'jstests/sharding/features1.js')
-rw-r--r-- | jstests/sharding/features1.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/jstests/sharding/features1.js b/jstests/sharding/features1.js index 0a31b5c94c9..ec2ae0b7068 100644 --- a/jstests/sharding/features1.js +++ b/jstests/sharding/features1.js @@ -172,53 +172,6 @@ var res = s.admin.runCommand({shardcollection: "test.foo5", key: {num: 1}}); assert(!res.ok, "shard capped: " + tojson(res)); - // ----- group ---- - - db.foo6.save({a: 1}); - db.foo6.save({a: 3}); - db.foo6.save({a: 3}); - db.foo6.ensureIndex({a: 1}); - s.sync(); - printjson(db.foo6.getIndexes()); - - assert.eq(2, - db.foo6 - .group({ - key: {a: 1}, - initial: {count: 0}, - reduce: function(z, prev) { - prev.count++; - } - }) - .length); - - assert.eq(3, db.foo6.find().count()); - assert(s.admin.runCommand({shardcollection: "test.foo6", key: {a: 1}}).ok); - assert.eq(3, db.foo6.find().count()); - - s.adminCommand({split: "test.foo6", middle: {a: 2}}); - - // movechunk commands are wrapped in assert.soon - // Sometimes the TO-side shard isn't immediately ready, this - // causes problems on slow hosts. - // Remove when SERVER-10232 is fixed - - assert.soon(function() { - var cmdRes = s.admin.runCommand( - {movechunk: "test.foo6", find: {a: 3}, to: s.getOther(s.getPrimaryShard("test")).name}); - return cmdRes.ok; - }, 'move chunk test.foo6', 60000, 1000); - - assert.throws(function() { - db.foo6.group({ - key: {a: 1}, - initial: {count: 0}, - reduce: function(z, prev) { - prev.count++; - } - }); - }); - // ---- can't shard non-empty collection without index ----- assert.writeOK(db.foo8.save({a: 1})); |