diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2020-02-03 16:30:20 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-04 18:30:43 +0000 |
commit | 0eaddad5bb19553974910d4957d18e1ad790a504 (patch) | |
tree | 94aa4d80c28d004069ceb2822de131a3dbd06fc4 | |
parent | 2b5356ef52457ebdc39036b3674ab064170b30d7 (diff) | |
download | mongo-0eaddad5bb19553974910d4957d18e1ad790a504.tar.gz |
SERVER-45150 Fix two repl tests to not call hang analyzer on expected timeouts
-rw-r--r-- | jstests/replsets/unrecoverable_rollback_early_exit.js | 9 | ||||
-rw-r--r-- | jstests/ssl/libs/ssl_helpers.js | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/jstests/replsets/unrecoverable_rollback_early_exit.js b/jstests/replsets/unrecoverable_rollback_early_exit.js index c709820eaa6..56ba99dc45e 100644 --- a/jstests/replsets/unrecoverable_rollback_early_exit.js +++ b/jstests/replsets/unrecoverable_rollback_early_exit.js @@ -66,7 +66,14 @@ failpoint.off(); rollbackTest.setAwaitSecondaryNodesForRollbackTimeout(5 * 1000); // We will detect an unrecoverable rollback here. -rollbackTest.transitionToSteadyStateOperations(); +// This will cause an assert.soon() in ReplSetTest to fail. This normally triggers the hang +// analyzer, but since we do not want to run it on expected timeouts, we temporarily disable it. +MongoRunner.runHangAnalyzer.disable(); +try { + rollbackTest.transitionToSteadyStateOperations(); +} finally { + MongoRunner.runHangAnalyzer.enable(); +} rollbackTest.stop(); })();
\ No newline at end of file diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js index 2c763682e24..db53fa7c687 100644 --- a/jstests/ssl/libs/ssl_helpers.js +++ b/jstests/ssl/libs/ssl_helpers.js @@ -59,7 +59,14 @@ var replShouldFail = function(name, opt1, opt2) { ssl_options1 = opt1; ssl_options2 = opt2; ssl_name = name; - assert.throws(load, [replSetTestFile], "This setup should have failed"); + // This will cause an assert.soon() in ReplSetTest to fail. This normally triggers the hang + // analyzer, but since we do not want to run it on expected timeouts, we temporarily disable it. + MongoRunner.runHangAnalyzer.disable(); + try { + assert.throws(load, [replSetTestFile], "This setup should have failed"); + } finally { + MongoRunner.runHangAnalyzer.enable(); + } // Note: this leaves running mongod processes. }; |