diff options
Diffstat (limited to 'jstests/aggregation/extras')
-rw-r--r-- | jstests/aggregation/extras/mrabench.js | 11 | ||||
-rw-r--r-- | jstests/aggregation/extras/testutils.js | 8 | ||||
-rw-r--r-- | jstests/aggregation/extras/utils.js | 8 |
3 files changed, 12 insertions, 15 deletions
diff --git a/jstests/aggregation/extras/mrabench.js b/jstests/aggregation/extras/mrabench.js index fe731ecd28b..78be64a2064 100644 --- a/jstests/aggregation/extras/mrabench.js +++ b/jstests/aggregation/extras/mrabench.js @@ -11,10 +11,7 @@ function rollupMap() { } function rollupReduce(key, values) { - var res = { - total: 0, - unique: 0 - }; + var res = {total: 0, unique: 0}; for (var i = 0; i < values.length; i++) { res.total += values[i].total; res.unique += values[i].unique; @@ -41,15 +38,13 @@ function rollupWeeklyMR() { function rollupMonthlyA() { resMonthlyA = db.runCommand({ aggregate: "gen.monthly.ip", - pipeline: - [{$group: {_id: {month: "_id.t"}, total: {$sum: "$value"}, unique: {$sum: 1}}}] + pipeline: [{$group: {_id: {month: "_id.t"}, total: {$sum: "$value"}, unique: {$sum: 1}}}] }); } function rollupWeeklyA() { resWeeklyA = db.runCommand({ aggregate: "gen.weekly.ip", - pipeline: - [{$group: {_id: {month: "_id.t"}, total: {$sum: "$value"}, unique: {$sum: 1}}}] + pipeline: [{$group: {_id: {month: "_id.t"}, total: {$sum: "$value"}, unique: {$sum: 1}}}] }); } diff --git a/jstests/aggregation/extras/testutils.js b/jstests/aggregation/extras/testutils.js index bb753921906..bd05ea835f0 100644 --- a/jstests/aggregation/extras/testutils.js +++ b/jstests/aggregation/extras/testutils.js @@ -39,7 +39,13 @@ assert(!resultsEq(t1result, t1resultf2, verbose), 't2a failed'); assert(!resultsEq(t1resultf2, t1result, verbose), 't2b failed'); var t1resultf3 = [ - {"_id": ObjectId("4dc07fedd8420ab8d0d4066d"), "pageViews": 5, "tags": ["fun", ]}, + { + "_id": ObjectId("4dc07fedd8420ab8d0d4066d"), + "pageViews": 5, + "tags": [ + "fun", + ] + }, {"_id": ObjectId("4dc07fedd8420ab8d0d4066e"), "pageViews": 7, "tags": ["fun", "nasty"]}, {"_id": ObjectId("4dc07fedd8420ab8d0d4066f"), "pageViews": 6, "tags": ["filthy"]} ]; diff --git a/jstests/aggregation/extras/utils.js b/jstests/aggregation/extras/utils.js index 33cfe9b2b2b..7fca7aa0ca3 100644 --- a/jstests/aggregation/extras/utils.js +++ b/jstests/aggregation/extras/utils.js @@ -259,13 +259,9 @@ function assertErrorCode(coll, pipe, code, errmsg) { assert.eq(res.code, code); // Test with cursors - var cmd = { - pipeline: pipe - }; + var cmd = {pipeline: pipe}; // cmd.cursor = {}; - cmd.cursor = { - batchSize: 0 - }; + cmd.cursor = {batchSize: 0}; var cursorRes = coll.runCommand("aggregate", cmd); if (cursorRes.ok) { |