diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-04-23 17:13:51 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-05-01 09:43:36 -0400 |
commit | 80ae7e58d34c827f9e0fe0ea9341680f6a1abb74 (patch) | |
tree | 0fa704f691cecae51fb391a7e78cf470bea02316 /jstests/slow1 | |
parent | 3ccb539d044a66bb0f7e341048882b51171e8e52 (diff) | |
download | mongo-80ae7e58d34c827f9e0fe0ea9341680f6a1abb74.tar.gz |
SERVER-34526 Jstests should not depend on ReplSetTest.liveNodes
Diffstat (limited to 'jstests/slow1')
-rw-r--r-- | jstests/slow1/replsets_priority1.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/jstests/slow1/replsets_priority1.js b/jstests/slow1/replsets_priority1.js index cff7a9038e7..f312b4830d6 100644 --- a/jstests/slow1/replsets_priority1.js +++ b/jstests/slow1/replsets_priority1.js @@ -157,17 +157,17 @@ assert.soon(function() { rs.getPrimary(); - return rs.liveNodes.slaves.length == 2; + return rs._slaves.length == 2; }, "2 slaves"); print("\nreplsets_priority1.js wait for new config version " + config.version); assert.soon(function() { var versions = [0, 0]; - rs.liveNodes.slaves[0].setSlaveOk(); - versions[0] = rs.liveNodes.slaves[0].getDB("local").system.replset.findOne().version; - rs.liveNodes.slaves[1].setSlaveOk(); - versions[1] = rs.liveNodes.slaves[1].getDB("local").system.replset.findOne().version; + rs._slaves[0].setSlaveOk(); + versions[0] = rs._slaves[0].getDB("local").system.replset.findOne().version; + rs._slaves[1].setSlaveOk(); + versions[1] = rs._slaves[1].getDB("local").system.replset.findOne().version; return versions[0] == config.version && versions[1] == config.version; }); @@ -196,7 +196,10 @@ checkPrimaryIs(second); // Wait for election oplog entry to be replicated, to avoid rollbacks later on. - rs.awaitReplication(); + let liveSlaves = rs.nodes.filter(function(node) { + return node.host !== max.host && node.host !== second.host; + }); + rs.awaitReplication(null, null, liveSlaves); print("restart max " + max._id); |