diff options
author | Ali Mir <ali.mir@mongodb.com> | 2020-08-11 11:34:10 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-20 21:14:32 +0000 |
commit | d6fe50035aff8026937dff9d8544ff213ad05152 (patch) | |
tree | 6e600e6cd823d2110de686e16b5745f6d8095783 /jstests/replsets/drain.js | |
parent | 48608c570f1357d640bc80d114b4d04cf6a55743 (diff) | |
download | mongo-d6fe50035aff8026937dff9d8544ff213ad05152.tar.gz |
SERVER-49990 Alias setSlaveOk() and getSlaveOk() shell helpers
Diffstat (limited to 'jstests/replsets/drain.js')
-rw-r--r-- | jstests/replsets/drain.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/replsets/drain.js b/jstests/replsets/drain.js index 493709eee53..31b595ccfb0 100644 --- a/jstests/replsets/drain.js +++ b/jstests/replsets/drain.js @@ -66,7 +66,7 @@ assert.writeError(secondary.getDB("foo").flag.insert({sentinel: 2})); assert(!secondary.getDB("admin").runCommand({"isMaster": 1}).ismaster); // Ensure new primary is not yet readable without slaveOk bit. -secondary.slaveOk = false; +secondary.setSecondaryOk(false); jsTestLog('New primary should not be readable yet, without slaveOk bit'); var res = secondary.getDB("foo").runCommand({find: "foo"}); assert.commandFailed(res); @@ -74,7 +74,7 @@ assert.eq(ErrorCodes.NotMasterNoSlaveOk, res.code, "find failed with unexpected error code: " + tojson(res)); // Nor should it be readable with the slaveOk bit. -secondary.slaveOk = true; +secondary.setSecondaryOk(); assert.commandWorked(secondary.getDB("foo").runCommand({find: "foo"})); assert(!secondary.adminCommand({"isMaster": 1}).ismaster); |