summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2020-02-18 15:06:20 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 22:03:51 +0000
commit11640b2138d40777a4b45005628b4facfba7e6b2 (patch)
treebc07703401c6766db10c59e31d63bc4860a839ab
parent879b80242e3381415cd725c6566818501b537b64 (diff)
downloadmongo-11640b2138d40777a4b45005628b4facfba7e6b2.tar.gz
SERVER-46026 js_exceptions.js against structured logs
-rw-r--r--jstests/noPassthrough/js_exceptions.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/noPassthrough/js_exceptions.js b/jstests/noPassthrough/js_exceptions.js
index 53a09544576..2ab6d2cfd6f 100644
--- a/jstests/noPassthrough/js_exceptions.js
+++ b/jstests/noPassthrough/js_exceptions.js
@@ -4,6 +4,9 @@
*/
(function() {
'use strict';
+
+load("jstests/libs/logv2_helpers.js");
+
let tests = [
{
callback: function() {
@@ -96,9 +99,13 @@ tests.forEach(function(t) {
}
}
assert(matchShellExp);
- assertMatch(/^\s*$/, lines.pop());
+ assertMatch(/\s*/, lines.pop());
assertMatch(/exiting with code/, lines.pop());
- assertMatch(new RegExp("\\\[js\\\] " + t.match + "$"), lines.shift());
+ if (isJsonLogNoConn()) {
+ assertMatch(new RegExp("\"ctx\":\"js\".*" + t.match), lines.shift());
+ } else {
+ assertMatch(new RegExp("\\\[js\\\] " + t.match + "$"), lines.shift());
+ }
if (t.stack == true) {
assert.eq(lines.length,