diff options
author | Ryan Timmons <ryan.timmons@mongodb.com> | 2019-11-05 19:00:15 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-05 19:00:15 +0000 |
commit | 2e5391cb4ca41bb352507915b0fe24b142d61a29 (patch) | |
tree | 79da759a136705cce73cb22261c002028d3cb9de /src/mongo/shell | |
parent | 01508fb5661fd87d5d65eca1c4941ada9c9e8d21 (diff) | |
download | mongo-2e5391cb4ca41bb352507915b0fe24b142d61a29.tar.gz |
SERVER-44395 Hang-Analyzer Integration Using Incorrect Arguments
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/assert.js | 8 | ||||
-rw-r--r-- | src/mongo/shell/utils.js | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/shell/assert.js b/src/mongo/shell/assert.js index f5695046970..53e283b540a 100644 --- a/src/mongo/shell/assert.js +++ b/src/mongo/shell/assert.js @@ -345,7 +345,7 @@ assert = (function() { "with {runHangAnalyzer: false} as the fifth argument " + "(you can fill unused arguments with `undefined`)."; print(msg + " Running hang analyzer from assert.soon."); - MongoRunner.runHangAnalyzer(msg); + MongoRunner.runHangAnalyzer(); } doassert(msg); } else { @@ -385,14 +385,14 @@ assert = (function() { } } // Used up all attempts - msg = _buildAssertionMessage(msg, msgPrefix); + msg = _buildAssertionMessage(msg); if (runHangAnalyzer) { msg = msg + "The hang analyzer is automatically called in assert.retry functions. " + "If you are *expecting* assert.soon to possibly fail, call assert.retry " + "with {runHangAnalyzer: false} as the fifth argument " + "(you can fill unused arguments with `undefined`)."; print(msg + " Running hang analyzer from assert.retry."); - MongoRunner.runHangAnalyzer(msg); + MongoRunner.runHangAnalyzer(); } doassert(msg); }; @@ -454,7 +454,7 @@ assert = (function() { "with {runHangAnalyzer: false} as the fourth argument " + "(you can fill unused arguments with `undefined`)."; print(msg + " Running hang analyzer from assert.time."); - MongoRunner.runHangAnalyzer(msg); + MongoRunner.runHangAnalyzer(); } doassert(msg); } diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js index c3377a1254e..909b82ffd52 100644 --- a/src/mongo/shell/utils.js +++ b/src/mongo/shell/utils.js @@ -392,7 +392,9 @@ jsTest.authenticate = function(conn) { pwd: jsTestOptions().authPassword, }); return conn.authenticated; - }, "Authenticating connection: " + conn, 5000, 1000); + // Dont' run the hang analyzer because we expect that this might fail in the normal + // course of events. + }, "Authenticating connection: " + conn, 5000, 1000, {runHangAnalyzer: false}); } catch (e) { print("Caught exception while authenticating connection: " + tojson(e)); conn.authenticated = false; |