diff options
author | Misha Tyulenev <misha@mongodb.com> | 2016-08-01 10:51:07 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2016-08-01 10:51:25 -0400 |
commit | f32f51272b44f895875ab36fc0ae1553d11f1cc2 (patch) | |
tree | 8cb54ad9ef695e6e155bbbd98cee39c6d20fae8a /jstests/sharding/remove2.js | |
parent | 2ed489b884676ae93bcf6373b49a2a838979b693 (diff) | |
download | mongo-f32f51272b44f895875ab36fc0ae1553d11f1cc2.tar.gz |
SERVER-23192 periodically reload ShardRegistry from the catalog
Diffstat (limited to 'jstests/sharding/remove2.js')
-rw-r--r-- | jstests/sharding/remove2.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/jstests/sharding/remove2.js b/jstests/sharding/remove2.js index 4e1a1578a3b..d2121511344 100644 --- a/jstests/sharding/remove2.js +++ b/jstests/sharding/remove2.js @@ -76,15 +76,6 @@ var conn = new Mongo(st.s.host); var coll = conn.getCollection("test.remove2"); coll.drop(); -// Decrease how long it will take for rst0 to time out its ReplicaSetMonitor for rst1 when rs1 is -// shut down -for (var i = 0; i < rst0.nodes.length; i++) { - node = rst0.nodes[i]; - res = node.getDB('admin').runCommand({setParameter: 1, replMonitorMaxFailedChecks: 1}); - printjson(res); - assert(res.ok); -} - st.admin.runCommand({enableSharding: coll.getDB().getName()}); st.ensurePrimaryShard(coll.getDB().getName(), 'test-rs0'); st.admin.runCommand({shardCollection: coll.getFullName(), key: {i: 1}}); @@ -171,8 +162,8 @@ assert( conn.getDB('test2').dropDatabase().ok );*/ jsTestLog("Attempt removing shard and adding a new shard with the same Replica Set name"); removeShard(st, rst1); rst1.stopSet(); -print("Sleeping for 20 seconds to let the other shard's ReplicaSetMonitor time out"); -sleep(20000); +print("Sleeping for 60 seconds to let the other shards restart their ReplicaSetMonitors"); +sleep(60000); var rst2 = new ReplSetTest({name: rst1.name, nodes: 2, useHostName: true}); rst2.startSet(); @@ -192,6 +183,8 @@ jsTestLog("Putting ShardingTest back to state it expects"); printjson(st.admin.runCommand({movePrimary: 'test2', to: rst0.name})); removeShard(st, rst2); rst2.stopSet(); +print("Sleeping for 60 seconds to let the other shards restart their ReplicaSetMonitors"); +sleep(60000); rst1.startSet(); rst1.initiate(); |