diff options
author | Ali Mir <ali.mir@mongodb.com> | 2020-09-16 19:33:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-28 18:05:55 +0000 |
commit | 93cff71bfc5b28d0724e9c19f52041f249fb854c (patch) | |
tree | ea3de0eecbf90d8f84db5dfe71d5c4138c0224f4 /jstests/replsets/maintenance.js | |
parent | f509116d2db0aa550d05c77f385402cd0d1406b4 (diff) | |
download | mongo-93cff71bfc5b28d0724e9c19f52041f249fb854c.tar.gz |
SERVER-50651 Replace occurrences of isMaster command with hello in replsets jstests
Diffstat (limited to 'jstests/replsets/maintenance.js')
-rw-r--r-- | jstests/replsets/maintenance.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/jstests/replsets/maintenance.js b/jstests/replsets/maintenance.js index 5ad4bd55620..7becd2e0422 100644 --- a/jstests/replsets/maintenance.js +++ b/jstests/replsets/maintenance.js @@ -20,7 +20,7 @@ for (i = 0; i < 20; i++) { replTest.awaitReplication(); assert.soon(function() { - return conns[1].getDB("admin").isMaster().secondary; + return conns[1].getDB("admin").hello().secondary; }); join = @@ -33,10 +33,10 @@ print("check secondary becomes a secondary again"); var secondarySoon = function() { var x = 0; assert.soon(function() { - var im = conns[1].getDB("admin").isMaster(); + var helloRes = conns[1].getDB("admin").hello(); if (x++ % 5 == 0) - printjson(im); - return im.secondary; + printjson(helloRes); + return helloRes.secondary; }); }; @@ -69,10 +69,10 @@ assert.eq(result.ok, 1, tojson(result)); print("make sure secondary goes into recovering"); var x = 0; assert.soon(function() { - var im = conns[1].getDB("admin").isMaster(); + var helloRes = conns[1].getDB("admin").hello(); if (x++ % 5 == 0) - printjson(im); - return !im.secondary && !im.ismaster; + printjson(helloRes); + return !helloRes.secondary && !helloRes.isWritablePrimary; }); var recv = conns[1].getDB("admin").runCommand({find: "foo"}); |