diff options
Diffstat (limited to 'jstests/noPassthrough/startup_logging.js')
-rw-r--r-- | jstests/noPassthrough/startup_logging.js | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/jstests/noPassthrough/startup_logging.js b/jstests/noPassthrough/startup_logging.js index d1b73bb1c56..ced10a08d04 100644 --- a/jstests/noPassthrough/startup_logging.js +++ b/jstests/noPassthrough/startup_logging.js @@ -4,32 +4,31 @@ (function() { - 'use strict'; - - function makeRegExMatchFn(pattern) { - return function(text) { - return pattern.test(text); - }; - } - - function testStartupLogging(launcher, matchFn, expectedExitCode) { - assert(matchFn(rawMongoProgramOutput())); - } - - function validateWaitingMessage(launcher) { - clearRawMongoProgramOutput(); - var conn = launcher.start({}); - launcher.stop(conn, undefined, {}); - testStartupLogging(launcher, makeRegExMatchFn(/waiting for connections on port/)); - } - - print("********************\nTesting startup logging in mongod\n********************"); - - validateWaitingMessage({ - start: function(opts) { - return MongoRunner.runMongod(opts); - }, - stop: MongoRunner.stopMongod - }); - +'use strict'; + +function makeRegExMatchFn(pattern) { + return function(text) { + return pattern.test(text); + }; +} + +function testStartupLogging(launcher, matchFn, expectedExitCode) { + assert(matchFn(rawMongoProgramOutput())); +} + +function validateWaitingMessage(launcher) { + clearRawMongoProgramOutput(); + var conn = launcher.start({}); + launcher.stop(conn, undefined, {}); + testStartupLogging(launcher, makeRegExMatchFn(/waiting for connections on port/)); +} + +print("********************\nTesting startup logging in mongod\n********************"); + +validateWaitingMessage({ + start: function(opts) { + return MongoRunner.runMongod(opts); + }, + stop: MongoRunner.stopMongod +}); }()); |