diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2019-01-29 23:16:33 +0000 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2019-01-29 23:16:33 +0000 |
commit | 254fff93270089e8ac33be3f7e079aa8bfc3f7bc (patch) | |
tree | ef7f69b2cacc081a16b4da1b58c327f29ae0b8b4 /jstests | |
parent | a3d232b697dfc7c8833fc1855abbc190fe0d5970 (diff) | |
download | mongo-254fff93270089e8ac33be3f7e079aa8bfc3f7bc.tar.gz |
Revert "SERVER-29286 import and use mozjs-60"
This reverts commit a3d232b697dfc7c8833fc1855abbc190fe0d5970.
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/libs/override_methods/continuous_stepdown.js | 14 | ||||
-rw-r--r-- | jstests/noPassthrough/client_metadata_slowlog.js | 2 | ||||
-rw-r--r-- | jstests/noPassthrough/libs/configExpand/lib.js | 36 | ||||
-rw-r--r-- | jstests/noPassthrough/shell_load_file.js | 7 |
4 files changed, 21 insertions, 38 deletions
diff --git a/jstests/libs/override_methods/continuous_stepdown.js b/jstests/libs/override_methods/continuous_stepdown.js index d9ea61240bd..7677bcdfe1c 100644 --- a/jstests/libs/override_methods/continuous_stepdown.js +++ b/jstests/libs/override_methods/continuous_stepdown.js @@ -193,19 +193,7 @@ let ContinuousStepdown; * Overrides startSet call to increase logging verbosity. */ this.startSet = function() { - let options = arguments[0] || {}; - - if (typeof(options.setParameter) === "string") { - var eqIdx = options.setParameter.indexOf("="); - if (eqIdx != -1) { - var param = options.setParameter.substring(0, eqIdx); - var value = options.setParameter.substring(eqIdx + 1); - options.setParameter = {}; - options.setParameter[param] = value; - } - } - arguments[0] = options; - + let options = arguments[0] = arguments[0] || {}; options.setParameter = options.setParameter || {}; options.setParameter.logComponentVerbosity = verbositySetting; return _originalStartSetFn.apply(this, arguments); diff --git a/jstests/noPassthrough/client_metadata_slowlog.js b/jstests/noPassthrough/client_metadata_slowlog.js index 993d7c47914..bef9b0ce9e7 100644 --- a/jstests/noPassthrough/client_metadata_slowlog.js +++ b/jstests/noPassthrough/client_metadata_slowlog.js @@ -22,7 +22,7 @@ print(`Checking ${conn.fullOptions.logFile} for client metadata message`); let log = cat(conn.fullOptions.logFile); assert( - /COMMAND .* command test.foo appName: "MongoDB Shell" command: count { count: "foo", query: { \$where: function\(\)/ + /COMMAND .* command test.foo appName: "MongoDB Shell" command: count { count: "foo", query: { \$where: function ()/ .test(log), "'slow query' log line missing in mongod log file!\n" + "Log file contents: " + conn.fullOptions.logFile + diff --git a/jstests/noPassthrough/libs/configExpand/lib.js b/jstests/noPassthrough/libs/configExpand/lib.js index a9845ee0983..c2a901b1210 100644 --- a/jstests/noPassthrough/libs/configExpand/lib.js +++ b/jstests/noPassthrough/libs/configExpand/lib.js @@ -81,29 +81,27 @@ class ConfigExpandRestServer { } function makeReflectionCmd(arg, opts = {}) { - return function(arg, opts) { - 'use strict'; + 'use strict'; - load('jstests/libs/python.js'); - let cmd = getPython3Binary(); - if (_isWindows()) { - cmd = '"' + cmd + '"'; - } - cmd += ' jstests/noPassthrough/libs/configExpand/reflect.py'; + load('jstests/libs/python.js'); + let cmd = getPython3Binary(); + if (_isWindows()) { + cmd = '"' + cmd + '"'; + } + cmd += ' jstests/noPassthrough/libs/configExpand/reflect.py'; - if (opts.sleep && (opts.sleep > 0)) { - cmd += ' -s ' + Number(opts.sleep); - } + if (opts.sleep && (opts.sleep > 0)) { + cmd += ' -s ' + Number(opts.sleep); + } - // Escape arguments to the shell by wrapping in OS appropriate quotes. - if (_isWindows()) { - cmd += ' ' + arg.split('"').map(v => '"' + v + '"').join('\\"'); - } else { - cmd += ' ' + arg.split("'").map(v => "'" + v + "'").join("\\'"); - } + // Escape arguments to the shell by wrapping in OS appropriate quotes. + if (_isWindows()) { + cmd += ' ' + arg.split('"').map(v => '"' + v + '"').join('\\"'); + } else { + cmd += ' ' + arg.split("'").map(v => "'" + v + "'").join("\\'"); + } - return cmd; - }.call(this, arg, opts); + return cmd; } function jsToYaml(config, toplevel = true) { diff --git a/jstests/noPassthrough/shell_load_file.js b/jstests/noPassthrough/shell_load_file.js index e110e8c34ec..d7911918c95 100644 --- a/jstests/noPassthrough/shell_load_file.js +++ b/jstests/noPassthrough/shell_load_file.js @@ -34,10 +34,7 @@ for (let i = 0; i < TestData.loadErrors.length; ++i) { const error = TestData.loadErrors[i]; assert.eq("error loading js file: jstests/noPassthrough/shell_load_file.js", error.message); - assert( - /@jstests\/noPassthrough\/shell_load_file.js:/.test(error.stack), - () => - "JavaScript stacktrace from load() didn't include filen path (AKA:stack frames): " + - error.stack); + assert(error.stack === "", + () => "JavaScript stacktrace from load() wasn't empty: " + error.stack); } })(); |