summaryrefslogtreecommitdiff
path: root/jstests/sharding/max_time_ms_sharded.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-21 11:30:31 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-23 10:39:04 -0500
commita7e6d919ec602af002c61797d6c5ae5dfc6e6217 (patch)
tree52868563464ce8e04fe19bf1871f1a48a74a3f31 /jstests/sharding/max_time_ms_sharded.js
parent551e33cd86e8fcb6c87050d0249bac6fc8342534 (diff)
downloadmongo-a7e6d919ec602af002c61797d6c5ae5dfc6e6217.tar.gz
SERVER-21050 Continuous config server primary step down
This change adds a continuous primary stepdown capability to the ReplicaSetTest and hooks it into ShardingTest.
Diffstat (limited to 'jstests/sharding/max_time_ms_sharded.js')
-rw-r--r--jstests/sharding/max_time_ms_sharded.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/sharding/max_time_ms_sharded.js b/jstests/sharding/max_time_ms_sharded.js
index cc3d87505ec..02a6d215c58 100644
--- a/jstests/sharding/max_time_ms_sharded.js
+++ b/jstests/sharding/max_time_ms_sharded.js
@@ -4,9 +4,11 @@
//
// Note that mongos does not time out commands or query ops (which remains responsibility of mongod,
// pending development of an interrupt framework for mongos).
+(function() {
+'use strict';
var st = new ShardingTest({shards: 2});
-st.stopBalancer();
+
var mongos = st.s0;
var shards = [st.shard0, st.shard1];
var coll = mongos.getCollection("foo.bar");
@@ -51,7 +53,7 @@ assert.commandWorked(admin.runCommand({moveChunk: coll.getFullName(),
// Insert 100 documents into sharded collection, such that each shard owns 50.
//
var bulk = coll.initializeUnorderedBulkOp();
-for (i=-50; i<50; i++) {
+for (var i = -50; i < 50; i++) {
bulk.insert({ _id: i });
}
assert.writeOK(bulk.execute());
@@ -211,3 +213,5 @@ assert.commandWorked(admin.runCommand({moveChunk: coll.getFullName(),
// TODO Test additional commmands.
st.stop();
+
+})();