diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-19 16:58:45 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-19 20:20:14 -0500 |
commit | 5b3257d526f8217e303609418da1769275f81d03 (patch) | |
tree | 23df1988812742763033c90d8c80b7523cced557 /jstests/sharding/sharded_limit_batchsize.js | |
parent | bbff16c4b196133718b3d3f5cf7ce2095cc6d2b9 (diff) | |
download | mongo-5b3257d526f8217e303609418da1769275f81d03.tar.gz |
SERVER-21527 Cleanup usages of getShard for resolving host to shard
Diffstat (limited to 'jstests/sharding/sharded_limit_batchsize.js')
-rw-r--r-- | jstests/sharding/sharded_limit_batchsize.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jstests/sharding/sharded_limit_batchsize.js b/jstests/sharding/sharded_limit_batchsize.js index 051038c4608..57303ed530a 100644 --- a/jstests/sharding/sharded_limit_batchsize.js +++ b/jstests/sharding/sharded_limit_batchsize.js @@ -1,6 +1,8 @@ // Tests for sharded limit + batchSize. Make sure that various combinations // of limit and batchSize with sort return the correct results, and do not issue // unnecessary getmores (see SERVER-14299). +(function() { +'use strict'; /** * Test the correctness of queries with sort and batchSize on a sharded cluster, @@ -49,7 +51,6 @@ var st = new ShardingTest({ shards: 2, other: {shardOptions: {setParameter: "enableTestCommands=1"}} }); -st.stopBalancer(); var db = st.s.getDB("test"); var shardedCol = db.getCollection("sharded_limit_batchsize"); @@ -59,7 +60,7 @@ unshardedCol.drop(); // Enable sharding and pre-split the sharded collection. assert.commandWorked(db.adminCommand({enableSharding: db.getName()})); -db.adminCommand({movePrimary: db.getName(), to: "shard0000"}); +st.ensurePrimaryShard(db.getName(), "shard0000"); db.adminCommand({shardCollection: shardedCol.getFullName(), key: {_id: 1}}); assert.commandWorked(db.adminCommand({split: shardedCol.getFullName(), middle: {_id: 0}})); assert.commandWorked(db.adminCommand({moveChunk: shardedCol.getFullName(), @@ -114,3 +115,5 @@ jsTest.log("Running limit tests against non-sharded collection."); testLimit(unshardedCol, st.shard0); st.stop(); + +})(); |