summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
Diffstat (limited to 'jstests')
-rw-r--r--jstests/libs/override_methods/continuous_stepdown.js4
-rw-r--r--jstests/libs/retryable_writes_util.js2
-rw-r--r--jstests/noPassthrough/merge_out_on_secondary_fail_on_stepdown.js2
-rw-r--r--jstests/replsets/stepdown3.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/jstests/libs/override_methods/continuous_stepdown.js b/jstests/libs/override_methods/continuous_stepdown.js
index 72286c15f05..df11e5df873 100644
--- a/jstests/libs/override_methods/continuous_stepdown.js
+++ b/jstests/libs/override_methods/continuous_stepdown.js
@@ -382,7 +382,7 @@ ContinuousStepdown.configure = function(stepdownOptions,
try {
collInfo = db.getCollectionInfos();
} catch (e) {
- if (ErrorCodes.isNotMasterError(e.code)) {
+ if (ErrorCodes.isNotPrimaryError(e.code)) {
return false;
}
throw e;
@@ -390,7 +390,7 @@ ContinuousStepdown.configure = function(stepdownOptions,
collInfo.forEach(collDoc => {
const res = db.runCommand({collStats: collDoc["name"]});
- if (ErrorCodes.isNotMasterError(res.code)) {
+ if (ErrorCodes.isNotPrimaryError(res.code)) {
return false;
}
assert.commandWorked(res);
diff --git a/jstests/libs/retryable_writes_util.js b/jstests/libs/retryable_writes_util.js
index 664022e0693..5f037fc9db4 100644
--- a/jstests/libs/retryable_writes_util.js
+++ b/jstests/libs/retryable_writes_util.js
@@ -9,7 +9,7 @@ var RetryableWritesUtil = (function() {
* src/mongo/shell/session.js and use it here.
*/
function isRetryableCode(code) {
- return ErrorCodes.isNetworkError(code) || ErrorCodes.isNotMasterError(code) ||
+ return ErrorCodes.isNetworkError(code) || ErrorCodes.isNotPrimaryError(code) ||
ErrorCodes.isWriteConcernError(code) || ErrorCodes.isShutdownError(code) ||
ErrorCodes.isInterruption(code);
}
diff --git a/jstests/noPassthrough/merge_out_on_secondary_fail_on_stepdown.js b/jstests/noPassthrough/merge_out_on_secondary_fail_on_stepdown.js
index 1b8134f607d..135cdfcc6ab 100644
--- a/jstests/noPassthrough/merge_out_on_secondary_fail_on_stepdown.js
+++ b/jstests/noPassthrough/merge_out_on_secondary_fail_on_stepdown.js
@@ -48,7 +48,7 @@ let runTest = function(writeStage, failpoint) {
});
assert.commandFailed(cmdRes);
- assert(ErrorCodes.isNotMasterError(cmdRes.code), cmdRes);
+ assert(ErrorCodes.isNotPrimaryError(cmdRes.code), cmdRes);
`;
// Enable the fail point to stop the aggregate.
diff --git a/jstests/replsets/stepdown3.js b/jstests/replsets/stepdown3.js
index 53f8029908b..fa3ec022eed 100644
--- a/jstests/replsets/stepdown3.js
+++ b/jstests/replsets/stepdown3.js
@@ -38,7 +38,7 @@ var awaitShell = startParallelShell(command, primary.port);
print("getlasterror; should return an error");
let result = primary.getDB("test").runCommand({getLastError: 1, w: 2, wtimeout: 10 * 60 * 1000});
-assert(ErrorCodes.isNotMasterError(result.code));
+assert(ErrorCodes.isNotPrimaryError(result.code));
print("result of gle:");
printjson(result);