diff options
Diffstat (limited to 'jstests/core/stages_limit_skip.js')
-rw-r--r-- | jstests/core/stages_limit_skip.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/core/stages_limit_skip.js b/jstests/core/stages_limit_skip.js index 4586033cfff..7ca7b89b180 100644 --- a/jstests/core/stages_limit_skip.js +++ b/jstests/core/stages_limit_skip.js @@ -8,7 +8,7 @@ for (var i = 0; i < N; ++i) { t.insert({foo: i, bar: N - i, baz: i}); } -t.ensureIndex({foo: 1}) +t.ensureIndex({foo: 1}); // foo <= 20, decreasing // Limit of 5 results. @@ -16,7 +16,7 @@ ixscan1 = {ixscan: {args:{keyPattern:{foo: 1}, startKey: {"": 20}, endKey: {}, endKeyInclusive: true, direction: -1}}}; -limit1 = {limit: {args: {node: ixscan1, num: 5}}} +limit1 = {limit: {args: {node: ixscan1, num: 5}}}; res = db.runCommand({stageDebug: {collection: collname, plan: limit1}}); assert.eq(res.ok, 1); assert.eq(res.results.length, 5); @@ -25,7 +25,7 @@ assert.eq(res.results[4].foo, 16); // foo <= 20, decreasing // Skip 5 results. -skip1 = {skip: {args: {node: ixscan1, num: 5}}} +skip1 = {skip: {args: {node: ixscan1, num: 5}}}; res = db.runCommand({stageDebug: {collection: collname, plan: skip1}}); assert.eq(res.ok, 1); assert.eq(res.results.length, 16); |