diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-25 11:20:43 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-08 13:05:00 -0500 |
commit | 3ed6635a5fb26c354046d275a1217c4526b2fe02 (patch) | |
tree | f40aa20b5e62996843ce3df0f47b82042dd683a7 /jstests/slow1 | |
parent | 4f24dc58f48cb087db8a4832421d298e9e2633a0 (diff) | |
download | mongo-3ed6635a5fb26c354046d275a1217c4526b2fe02.tar.gz |
SERVER-21050 Cleanup ReplSetTest
This is just a cleanup work to hide some of the private state of
ReplSetTest so it is easier to encapsulate and add new logic. Also enables
strict mode.
Diffstat (limited to 'jstests/slow1')
-rw-r--r-- | jstests/slow1/replsets_priority1.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/slow1/replsets_priority1.js b/jstests/slow1/replsets_priority1.js index c9ec08fd78f..614c6b7cec7 100644 --- a/jstests/slow1/replsets_priority1.js +++ b/jstests/slow1/replsets_priority1.js @@ -9,7 +9,7 @@ var rs = new ReplSetTest( {name: 'testSet', nodes: 3, nodeOptions: {verbose: 2}} var nodes = rs.startSet(); rs.initiate(); -var master = rs.getMaster(); +var master = rs.getPrimary(); var everyoneOkSoon = function() { var status; @@ -133,7 +133,7 @@ for (i=0; i<n; i++) { try { master.adminCommand({replSetReconfig : config}); - master = rs.getMaster(); + master = rs.getPrimary(); reconnect(master); version = master.getDB("local").system.replset.findOne().version; @@ -148,7 +148,7 @@ for (i=0; i<n; i++) { print("\nreplsets_priority1.js wait for 2 slaves"); assert.soon(function() { - rs.getMaster(); + rs.getPrimary(); return rs.liveNodes.slaves.length == 2; }, "2 slaves"); @@ -177,7 +177,7 @@ for (i=0; i<n; i++) { rs.stop(max._id); - var master = rs.getMaster(); + var master = rs.getPrimary(); print("\nkilled max primary. Checking statuses."); @@ -187,7 +187,7 @@ for (i=0; i<n; i++) { print("restart max " + max._id); rs.restart(max._id); - master = rs.getMaster(); + master = rs.getPrimary(); print("max restarted. Checking statuses."); checkPrimaryIs(max); |