diff options
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/addshard2.js | 12 | ||||
-rw-r--r-- | jstests/sharding/auth.js | 6 | ||||
-rw-r--r-- | jstests/sharding/auth_add_shard.js | 4 | ||||
-rw-r--r-- | jstests/sharding/remove2.js | 6 | ||||
-rw-r--r-- | jstests/sharding/replmonitor_bad_seed.js | 2 | ||||
-rw-r--r-- | jstests/sharding/user_flags_sharded.js | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/jstests/sharding/addshard2.js b/jstests/sharding/addshard2.js index b3413c4ad98..8e23cc92d4f 100644 --- a/jstests/sharding/addshard2.js +++ b/jstests/sharding/addshard2.js @@ -5,27 +5,27 @@ new ShardingTest({name: "add_shard2", shards: 1, mongos: 1, other: {useHostname: true}}); // Start two new instances, which will be used for shards - var conn1 = MongoRunner.runMongod({useHostname: true}); - var conn2 = MongoRunner.runMongod({useHostname: true}); + var conn1 = MongoRunner.runMongod({useHostname: true, shardsvr: ""}); + var conn2 = MongoRunner.runMongod({useHostname: true, shardsvr: ""}); var rs1 = new ReplSetTest({"name": "add_shard2_rs1", nodes: 3}); - rs1.startSet(); + rs1.startSet({shardsvr: ""}); rs1.initiate(); var master1 = rs1.getPrimary(); var rs2 = new ReplSetTest({"name": "add_shard2_rs2", nodes: 3}); - rs2.startSet(); + rs2.startSet({shardsvr: ""}); rs2.initiate(); var master2 = rs2.getPrimary(); // replica set with set name = 'config' var rs3 = new ReplSetTest({'name': 'config', nodes: 3}); - rs3.startSet(); + rs3.startSet({shardsvr: ""}); rs3.initiate(); // replica set with set name = 'admin' var rs4 = new ReplSetTest({'name': 'admin', nodes: 3}); - rs4.startSet(); + rs4.startSet({shardsvr: ""}); rs4.initiate(); // replica set with configsvr: true should *not* be allowed to be added as a shard diff --git a/jstests/sharding/auth.js b/jstests/sharding/auth.js index f85ad22c6d5..03a3068008c 100644 --- a/jstests/sharding/auth.js +++ b/jstests/sharding/auth.js @@ -66,7 +66,7 @@ login(adminUser); var d1 = new ReplSetTest({name: "d1", nodes: 3, useHostName: true}); - d1.startSet({keyFile: "jstests/libs/key2"}); + d1.startSet({keyFile: "jstests/libs/key2", shardsvr: ""}); d1.initiate(); print("d1 initiated"); @@ -97,7 +97,7 @@ print("start rs w/correct key"); d1.stopSet(); - d1.startSet({keyFile: "jstests/libs/key1"}); + d1.startSet({keyFile: "jstests/libs/key1", restart: true}); d1.initiate(); var master = d1.getPrimary(); @@ -147,7 +147,7 @@ logout(testUser); var d2 = new ReplSetTest({name: "d2", nodes: 3, useHostName: true}); - d2.startSet({keyFile: "jstests/libs/key1"}); + d2.startSet({keyFile: "jstests/libs/key1", shardsvr: ""}); d2.initiate(); d2.awaitSecondaryNodes(); diff --git a/jstests/sharding/auth_add_shard.js b/jstests/sharding/auth_add_shard.js index f1cf6eccea4..c08b69b9afa 100644 --- a/jstests/sharding/auth_add_shard.js +++ b/jstests/sharding/auth_add_shard.js @@ -35,7 +35,7 @@ assert.eq(1, st.config.shards.count(), "initial server count wrong"); // start a mongod with NO keyfile - var conn = MongoRunner.runMongod({}); + var conn = MongoRunner.runMongod({shardsvr: ""}); print(conn); // --------------- Test 1 -------------------- @@ -47,7 +47,7 @@ //--------------- Test 2 -------------------- // start mongod again, this time with keyfile - var conn = MongoRunner.runMongod({keyFile: "jstests/libs/key1"}); + var conn = MongoRunner.runMongod({keyFile: "jstests/libs/key1", shardsvr: ""}); // try adding the new shard assert.commandWorked(admin.runCommand({addShard: conn.host})); diff --git a/jstests/sharding/remove2.js b/jstests/sharding/remove2.js index d2121511344..4f583a8ab4b 100644 --- a/jstests/sharding/remove2.js +++ b/jstests/sharding/remove2.js @@ -118,7 +118,7 @@ rst1.stopSet(); print("Sleeping for 20 seconds to let the other shard's ReplicaSetMonitor time out"); sleep(20000); // 1 failed check should take 10 seconds, sleep for 20 just to be safe -rst1.startSet(); +rst1.startSet({restart: true}); rst1.initiate(); rst1.awaitReplication(); @@ -166,7 +166,7 @@ print("Sleeping for 60 seconds to let the other shards restart their ReplicaSetM sleep(60000); var rst2 = new ReplSetTest({name: rst1.name, nodes: 2, useHostName: true}); -rst2.startSet(); +rst2.startSet({shardsvr: ""}); rst2.initiate(); rst2.awaitReplication(); @@ -186,7 +186,7 @@ rst2.stopSet(); print("Sleeping for 60 seconds to let the other shards restart their ReplicaSetMonitors"); sleep(60000); -rst1.startSet(); +rst1.startSet({restart: true}); rst1.initiate(); rst1.awaitReplication(); diff --git a/jstests/sharding/replmonitor_bad_seed.js b/jstests/sharding/replmonitor_bad_seed.js index c41f1043012..d3fe61a1275 100644 --- a/jstests/sharding/replmonitor_bad_seed.js +++ b/jstests/sharding/replmonitor_bad_seed.js @@ -28,7 +28,7 @@ st.restartMongos(0); - replTest.startSet({oplogSize: 10}); + replTest.startSet({restart: true}); replTest.initiate(); replTest.awaitSecondaryNodes(); diff --git a/jstests/sharding/user_flags_sharded.js b/jstests/sharding/user_flags_sharded.js index f629c3b759f..caf5280d185 100644 --- a/jstests/sharding/user_flags_sharded.js +++ b/jstests/sharding/user_flags_sharded.js @@ -8,8 +8,8 @@ var coll = "userFlagsColl"; var ns = dbname + "." + coll; - // First create fresh collection on a new standalone mongod - var newShardConn = MongoRunner.runMongod({}); + // First create fresh collection on a new standalone mongod that will become a shard. + var newShardConn = MongoRunner.runMongod({"shardsvr": ""}); var db1 = newShardConn.getDB(dbname); var t = db1.getCollection(coll); print(t); |