diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-05-28 17:55:12 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-05-28 17:55:12 -0400 |
commit | 6dcdd23dd37ef12c87e71cf59ef01cd82432efe0 (patch) | |
tree | c8cfb5acb62c80f375bc37e7d4350382deea6a37 /jstests/core/getlog2.js | |
parent | d4ac5673ea3f6cef4ce9dbcec90e31813997a528 (diff) | |
download | mongo-6dcdd23dd37ef12c87e71cf59ef01cd82432efe0.tar.gz |
SERVER-23971 Clang-Format code
Diffstat (limited to 'jstests/core/getlog2.js')
-rw-r--r-- | jstests/core/getlog2.js | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/jstests/core/getlog2.js b/jstests/core/getlog2.js index b6cf223b967..597a85e20ee 100644 --- a/jstests/core/getlog2.js +++ b/jstests/core/getlog2.js @@ -26,15 +26,14 @@ if (db.isMaster().msg != "isdbgrid") { }); // run a slow update - glcol.update( - { - "SENTINEL": 1, - "$where": function() { - sleep(1000); - return true; - } - }, - {"x": "x"}); + glcol.update({ + "SENTINEL": 1, + "$where": function() { + sleep(1000); + return true; + } + }, + {"x": "x"}); var resp = db.adminCommand({getLog: "global"}); assert(resp.ok == 1, "error executing getLog command"); @@ -42,21 +41,19 @@ if (db.isMaster().msg != "isdbgrid") { assert(resp.log.length > 0, "no log lines"); // ensure that slow query is logged in detail - assert(contains(resp.log, - function(v) { - print(v); - var opString = db.getMongo().useReadCommands() ? " find " : " query "; - var filterString = db.getMongo().useReadCommands() ? "filter:" : "query:"; - return v.indexOf(opString) != -1 && v.indexOf(filterString) != -1 && - v.indexOf("keysExamined:") != -1 && v.indexOf("docsExamined:") != -1 && - v.indexOf("SENTINEL") != -1; - })); + assert(contains(resp.log, function(v) { + print(v); + var opString = db.getMongo().useReadCommands() ? " find " : " query "; + var filterString = db.getMongo().useReadCommands() ? "filter:" : "query:"; + return v.indexOf(opString) != -1 && v.indexOf(filterString) != -1 && + v.indexOf("keysExamined:") != -1 && v.indexOf("docsExamined:") != -1 && + v.indexOf("SENTINEL") != -1; + })); // same, but for update - assert(contains(resp.log, - function(v) { - return v.indexOf(" update ") != -1 && v.indexOf("query") != -1 && - v.indexOf("keysExamined:") != -1 && v.indexOf("docsExamined:") != -1 && - v.indexOf("SENTINEL") != -1; - })); + assert(contains(resp.log, function(v) { + return v.indexOf(" update ") != -1 && v.indexOf("query") != -1 && + v.indexOf("keysExamined:") != -1 && v.indexOf("docsExamined:") != -1 && + v.indexOf("SENTINEL") != -1; + })); } |