summaryrefslogtreecommitdiff
path: root/jstests/replsets/secondaryOk_slaveOk_aliases.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/secondaryOk_slaveOk_aliases.js')
-rw-r--r--jstests/replsets/secondaryOk_slaveOk_aliases.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/replsets/secondaryOk_slaveOk_aliases.js b/jstests/replsets/secondaryOk_slaveOk_aliases.js
index 99a34d682ea..d0b9b95a8e3 100644
--- a/jstests/replsets/secondaryOk_slaveOk_aliases.js
+++ b/jstests/replsets/secondaryOk_slaveOk_aliases.js
@@ -25,7 +25,7 @@ assert.commandWorked(secondary.getDB(dbName).runCommand({find: collName}),
secondary.getDB(dbName).getMongo().setSecondaryOk(false);
assert.eq(secondary.getDB(dbName).getMongo().getSecondaryOk(), false);
assert.commandFailedWithCode(secondary.getDB(dbName).runCommand({find: collName}),
- ErrorCodes.NotMasterNoSlaveOk,
+ ErrorCodes.NotPrimaryNoSecondaryOk,
"find did not fail with the correct error code");
// setSlaveOk() is deprecated and aliased to setSecondaryOk(), but ensure
@@ -40,7 +40,7 @@ assert.commandWorked(secondary.getDB(dbName).runCommand({find: collName}),
secondary.getDB(dbName).getMongo().setSlaveOk(false);
assert.eq(secondary.getDB(dbName).getMongo().getSlaveOk(), false);
assert.commandFailedWithCode(secondary.getDB(dbName).runCommand({find: collName}),
- ErrorCodes.NotMasterNoSlaveOk,
+ ErrorCodes.NotPrimaryNoSecondaryOk,
"find did not fail with the correct error code");
rst.stopSet();
})();