diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2020-02-28 13:09:15 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-28 20:39:42 +0000 |
commit | 67aab821ad0057014b687778063d901073441dfc (patch) | |
tree | 09393c8eb611311055a07087d8162d0b22ee74b8 /jstests/ssl | |
parent | 5b58136c5442a21c601a4b5b38a95f15c44ae567 (diff) | |
download | mongo-67aab821ad0057014b687778063d901073441dfc.tar.gz |
SERVER-46495 ssl_cluster_ca should disable hang analyzer when failures are expected
Diffstat (limited to 'jstests/ssl')
-rw-r--r-- | jstests/ssl/ssl_cluster_ca.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/jstests/ssl/ssl_cluster_ca.js b/jstests/ssl/ssl_cluster_ca.js index 5f76e3b9531..5a934fb272b 100644 --- a/jstests/ssl/ssl_cluster_ca.js +++ b/jstests/ssl/ssl_cluster_ca.js @@ -17,9 +17,16 @@ function testRS(opts, succeed) { rs.initiate(); assert.commandWorked(rs.getPrimary().getDB('admin').runCommand({isMaster: 1})); } else { - assert.throws(function() { - rs.initiate(); - }); + // The rs.initiate will fail in an assert.soon, which would ordinarily trigger the hang + // analyzer. We don't want that to happen, so we disable it here. + MongoRunner.runHangAnalyzer.disable(); + try { + assert.throws(function() { + rs.initiate(); + }); + } finally { + MongoRunner.runHangAnalyzer.enable(); + } TestData.skipCheckDBHashes = true; } rs.stopSet(); |