summaryrefslogtreecommitdiff
path: root/src/mongo/shell/utils.js
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-09-07 15:31:27 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-09-21 15:06:33 -0400
commit442aab2feb4fdaf185bbecf26e0655369ff6262b (patch)
treedd618f5cf0d990aacb6aec5358f27263463da273 /src/mongo/shell/utils.js
parent5f8d84b1792839a4b372e8479d0eccba6fd64357 (diff)
downloadmongo-442aab2feb4fdaf185bbecf26e0655369ff6262b.tar.gz
SERVER-30953 Add auto-retry logic to the mongo shell for testing during stepdown suites
Diffstat (limited to 'src/mongo/shell/utils.js')
-rw-r--r--src/mongo/shell/utils.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 2e5e3fce6ff..08219d60d79 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -39,7 +39,8 @@ function _getErrorWithCode(codeOrObj, message) {
// Checks if a javascript exception is a network error.
function isNetworkError(error) {
- return error.message.indexOf("error doing query") >= 0 ||
+ return error.message.indexOf("network error") >= 0 ||
+ error.message.indexOf("error doing query") >= 0 ||
error.message.indexOf("socket exception") >= 0;
}
@@ -241,6 +242,7 @@ jsTestOptions = function() {
mongosBinVersion: TestData.mongosBinVersion || "",
shardMixedBinVersions: TestData.shardMixedBinVersions || false,
networkMessageCompressors: TestData.networkMessageCompressors,
+ skipRetryOnNetworkError: TestData.skipRetryOnNetworkError,
skipValidationOnInvalidViewDefinitions: TestData.skipValidationOnInvalidViewDefinitions,
skipCollectionAndIndexValidation: TestData.skipCollectionAndIndexValidation,
// We default skipValidationOnNamespaceNotFound to true because mongod can end up