diff options
author | Ali Mir <ali.mir@mongodb.com> | 2020-08-27 14:07:45 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-09 23:29:23 +0000 |
commit | 2b5dc35f019a3606c2dfa845cdfb320ffbac8014 (patch) | |
tree | 0b7c0bd55ba7b745986e7a248835fcfca1316109 /jstests/core/shell1.js | |
parent | ee106b978c7466bdd325cfb9f3f029d3769b1c1b (diff) | |
download | mongo-2b5dc35f019a3606c2dfa845cdfb320ffbac8014.tar.gz |
SERVER-50581 Replace setSlaveOk and getSlaveOk occurrences in jstests
Diffstat (limited to 'jstests/core/shell1.js')
-rw-r--r-- | jstests/core/shell1.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/jstests/core/shell1.js b/jstests/core/shell1.js index 7ea23f8d3a5..4fc4c3a1c15 100644 --- a/jstests/core/shell1.js +++ b/jstests/core/shell1.js @@ -4,11 +4,15 @@ shellHelper("show", "tables;"); shellHelper("show", "tables"); shellHelper("show", "tables ;"); -// test slaveOk levels -assert(!db.getSlaveOk() && !db.test.getSlaveOk() && !db.getMongo().getSlaveOk(), "slaveOk 1"); -db.getMongo().setSlaveOk(); -assert(db.getSlaveOk() && db.test.getSlaveOk() && db.getMongo().getSlaveOk(), "slaveOk 2"); -db.setSlaveOk(false); -assert(!db.getSlaveOk() && !db.test.getSlaveOk() && db.getMongo().getSlaveOk(), "slaveOk 3"); -db.test.setSlaveOk(true); -assert(!db.getSlaveOk() && db.test.getSlaveOk() && db.getMongo().getSlaveOk(), "slaveOk 4"); +// test secondaryOk levels +assert(!db.getSecondaryOk() && !db.test.getSecondaryOk() && !db.getMongo().getSecondaryOk(), + "secondaryOk 1"); +db.getMongo().setSecondaryOk(); +assert(db.getSecondaryOk() && db.test.getSecondaryOk() && db.getMongo().getSecondaryOk(), + "secondaryOk 2"); +db.setSecondaryOk(false); +assert(!db.getSecondaryOk() && !db.test.getSecondaryOk() && db.getMongo().getSecondaryOk(), + "secondaryOk 3"); +db.test.setSecondaryOk(); +assert(!db.getSecondaryOk() && db.test.getSecondaryOk() && db.getMongo().getSecondaryOk(), + "secondaryOk 4"); |