diff --git a/jstests/core/mr_bigobject_replace.js b/jstests/core/mr_bigobject_replace.js index dbed4664e7abd..28a295c1b2ef5 100644 --- a/jstests/core/mr_bigobject_replace.js +++ b/jstests/core/mr_bigobject_replace.js @@ -14,7 +14,10 @@ // Returns a document of the form { _id: ObjectId(...), value: '...' } with the specified // 'targetSize' in bytes. function makeDocWithSize(targetSize) { - var doc = {_id: new ObjectId(), value: ''}; + var doc = { + _id: new ObjectId(), + value: '' + }; var size = Object.bsonsize(doc); assert.gte(targetSize, size); @@ -38,17 +41,25 @@ // Insert a document so the mapper gets run. assert.writeOK(db.input.insert({})); - var res = db.runCommand(Object.extend({ - mapReduce: "input", - map: mapper, - out: {replace: "mr_bigobject_replace"}, - }, testOptions)); + var res = db.runCommand(Object.extend( + { + mapReduce: "input", + map: mapper, + out: {replace: "mr_bigobject_replace"}, + }, + testOptions)); assert.commandFailed(res, "creating a document larger than 16MB didn't fail"); - assert.lte(0, res.errmsg.indexOf("object to insert too large"), + assert.lte(0, + res.errmsg.indexOf("object to insert too large"), "map-reduce command failed for a reason other than inserting a large document"); } runTest({reduce: createBigDocument}); - runTest({reduce: function() { return 1; }, finalize: createBigDocument}); + runTest({ + reduce: function() { + return 1; + }, + finalize: createBigDocument + }); })(); diff --git a/jstests/noPassthrough/server22767.js b/jstests/noPassthrough/server22767.js index 9b915ce0940b9..74efd3eade448 100644 --- a/jstests/noPassthrough/server22767.js +++ b/jstests/noPassthrough/server22767.js @@ -1,14 +1,15 @@ // test that the mongos doesn't segfault when it receives malformed BSON -var st = new ShardingTest({shards:1}); +var st = new ShardingTest({shards: 1}); var testDB = st.getDB('test'); -testDB.test.insert({a:1}); +testDB.test.insert({a: 1}); try { testDB.test.find({key: {$regex: 'abcd\0xyz'}}).explain(); } catch (e) { /* * if the mongos segfaults, the error is the msg: - * "Error: error doing query: failed: network error while attempting to run command 'explain' on host '127.0.0.1:20014'" + * "Error: error doing query: failed: network error while attempting to run command 'explain' on + *host '127.0.0.1:20014'" * * if the mongos doesn't segfault, the error is the object: * "Error: explain failed: {