diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2016-06-23 17:47:13 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2016-06-24 11:51:20 -0400 |
commit | 20e9b2798d69fb2367ff9f16a1b30f4f9b73d93b (patch) | |
tree | 19acf1fff91817744a202958808800544b783486 /jstests/aggregation/bugs | |
parent | 5bdf5d6b8995637193a37d04a0b816b71e47b9fb (diff) | |
download | mongo-20e9b2798d69fb2367ff9f16a1b30f4f9b73d93b.tar.gz |
SERVER-24638 Move command processing from Pipeline to AggregationRequest
Diffstat (limited to 'jstests/aggregation/bugs')
-rw-r--r-- | jstests/aggregation/bugs/server7781.js | 7 | ||||
-rw-r--r-- | jstests/aggregation/bugs/server9444.js | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/jstests/aggregation/bugs/server7781.js b/jstests/aggregation/bugs/server7781.js index e8684dd813f..678a224630a 100644 --- a/jstests/aggregation/bugs/server7781.js +++ b/jstests/aggregation/bugs/server7781.js @@ -11,10 +11,9 @@ db[coll].insert({loc: [0, 0]}); // $geoNear is only allowed as the first stage in a pipeline, nowhere else. - assertErrorCode( - db[coll], - [{$match: {x: 1}}, {$geoNear: {near: [1, 1], spherical: true, distanceField: 'dis'}}], - 28837); + assert.throws( + () => db[coll].aggregate( + [{$match: {x: 1}}, {$geoNear: {near: [1, 1], spherical: true, distanceField: 'dis'}}])); function checkOutput(cmdOut, aggOut, expectedNum) { assert.commandWorked(cmdOut, "geoNear command"); diff --git a/jstests/aggregation/bugs/server9444.js b/jstests/aggregation/bugs/server9444.js index f3dc2748b0a..b2f027d314c 100644 --- a/jstests/aggregation/bugs/server9444.js +++ b/jstests/aggregation/bugs/server9444.js @@ -29,17 +29,16 @@ assert.eq(res.code, outOfMemoryCode); // ensure allowDiskUse: false does what it says - var res = t.runCommand('aggregate', {pipeline: pipeline, allowDiskUse: false}); + res = t.runCommand('aggregate', {pipeline: pipeline, allowDiskUse: false}); assert.commandFailed(res); assert.eq(res.code, outOfMemoryCode); // allowDiskUse only supports bool. In particular, numbers aren't allowed. - var res = t.runCommand('aggregate', {pipeline: pipeline, allowDiskUse: 1}); + res = t.runCommand('aggregate', {pipeline: pipeline, allowDiskUse: 1}); assert.commandFailed(res); - assert.eq(res.code, 16949); // ensure we work when allowDiskUse === true - var res = t.aggregate(pipeline, {allowDiskUse: true}); + res = t.aggregate(pipeline, {allowDiskUse: true}); assert.eq(res.itcount(), t.count()); // all tests output one doc per input doc } |