diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2016-12-13 17:53:24 -0500 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2016-12-16 12:15:17 -0500 |
commit | e55c4b224f1260e4d163be7a71db2737be298559 (patch) | |
tree | f0f814f50a8fce0564cc3880d4feb47ccb7c3707 /jstests/sharding/config_version_rollback.js | |
parent | d92892f7ad0a83252c788c08646d05ac46cfeabc (diff) | |
download | mongo-e55c4b224f1260e4d163be7a71db2737be298559.tar.gz |
SERVER-26525: Factor out identical checkLog functions
Diffstat (limited to 'jstests/sharding/config_version_rollback.js')
-rw-r--r-- | jstests/sharding/config_version_rollback.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/jstests/sharding/config_version_rollback.js b/jstests/sharding/config_version_rollback.js index 2fc5d78c8fc..bb066b8cc80 100644 --- a/jstests/sharding/config_version_rollback.js +++ b/jstests/sharding/config_version_rollback.js @@ -6,23 +6,7 @@ (function() { "use strict"; - - // Wait for fail point message to be logged. - var checkLog = function(node, msg) { - assert.soon( - function() { - var logMessages = assert.commandWorked(node.adminCommand({getLog: 'global'})).log; - for (var i = 0; i < logMessages.length; i++) { - if (logMessages[i].indexOf(msg) != -1) { - return true; - } - } - return false; - }, - 'Did not see a log entry for ' + node + ' containing the following message: ' + msg, - 60000, - 1000); - }; + load("jstests/libs/check_log.js"); // The config.version document is written on transition to primary. We need to ensure this // config.version document is rolled back for this test. @@ -70,7 +54,7 @@ // Ensure the primary is waiting to write the config.version document before stopping the oplog // fetcher on the secondaries. - checkLog( + checkLog.contains( origPriConn, 'transition to primary - transitionToPrimaryHangBeforeInitializingConfigDatabase fail point enabled.'); |