diff options
Diffstat (limited to 'jstests/aggregation/sources/graphLookup/error.js')
-rw-r--r-- | jstests/aggregation/sources/graphLookup/error.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/jstests/aggregation/sources/graphLookup/error.js b/jstests/aggregation/sources/graphLookup/error.js index 3ed81a9345d..ab09a851f5d 100644 --- a/jstests/aggregation/sources/graphLookup/error.js +++ b/jstests/aggregation/sources/graphLookup/error.js @@ -272,7 +272,7 @@ load("jstests/aggregation/extras/utils.js"); // For "assertErrorCode". } } }; - assertErrorCode(local, pipeline, 40187, "cannot use $near inside $graphLookup"); + assertErrorCode(local, pipeline, 40186, "cannot use $near inside $graphLookup"); pipeline = { $graphLookup: { @@ -293,7 +293,19 @@ load("jstests/aggregation/extras/utils.js"); // For "assertErrorCode". } } }; - assertErrorCode(local, pipeline, 40187, "cannot use $near inside $graphLookup at any depth"); + assertErrorCode(local, pipeline, 40186, "cannot use $near inside $graphLookup at any depth"); + + pipeline = { + $graphLookup: { + from: 'foreign', + startWith: {$literal: 0}, + connectToField: "a", + connectFromField: "b", + as: "output", + restrictSearchWithMatch: {x: {$expr: 5}} + } + }; + assertErrorCode(local, pipeline, 40186, "cannot use $expr inside $graphLookup"); // $graphLookup can only consume at most 100MB of memory. var foreign = db.foreign; |