summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/assert.js16
-rw-r--r--src/mongo/shell/servers.js5
-rw-r--r--src/mongo/shell/utils.js1
3 files changed, 17 insertions, 5 deletions
diff --git a/src/mongo/shell/assert.js b/src/mongo/shell/assert.js
index 07bf0c31bfd..2c34209c2fa 100644
--- a/src/mongo/shell/assert.js
+++ b/src/mongo/shell/assert.js
@@ -323,7 +323,13 @@ assert = (function() {
}
var start = new Date();
- timeout = timeout || 5 * 60 * 1000;
+
+ if (TestData.inEvergreen) {
+ timeout = timeout || 10 * 60 * 1000;
+ } else {
+ timeout = timeout || 60 * 1000;
+ }
+
interval = interval || 200;
var last;
while (1) {
@@ -340,10 +346,10 @@ assert = (function() {
msg = _buildAssertionMessage(msg, msgPrefix);
if (runHangAnalyzer) {
msg = msg +
- "The hang analyzer is automatically called in assert.soon functions. " +
- "If you are *expecting* assert.soon to possibly fail, call assert.soon " +
- "with {runHangAnalyzer: false} as the fifth argument " +
- "(you can fill unused arguments with `undefined`).";
+ " The hang analyzer is automatically called in assert.soon functions." +
+ " If you are *expecting* assert.soon to possibly fail, call assert.soon" +
+ " with {runHangAnalyzer: false} as the fifth argument" +
+ " (you can fill unused arguments with `undefined`).";
print(msg + " Running hang analyzer from assert.soon.");
MongoRunner.runHangAnalyzer();
}
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index 679b42463c9..e8da72e8ba0 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -123,6 +123,11 @@ function runHangAnalyzer(pids) {
return;
}
+ if (!TestData.inEvergreen) {
+ print('Skipping runHangAnalyzer: not running in Evergreen');
+ return;
+ }
+
if (!_hangAnalyzerEnabled) {
print('Skipping runHangAnalyzer: manually disabled');
return;
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 05c61f2a2eb..f1472995fc0 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -359,6 +359,7 @@ jsTestOptions = function() {
alwaysUseLogFiles: TestData.alwaysUseLogFiles || false,
skipCheckOrphans: TestData.skipCheckOrphans || false,
isAsanBuild: TestData.isAsanBuild,
+ inEvergreen: TestData.inEvergreen || false,
});
}
return _jsTestOptions;