diff options
author | David Storch <david.storch@10gen.com> | 2015-10-15 15:20:37 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-10-22 13:40:06 -0400 |
commit | 737bb20fcb9176eb5f664bd874cdaece779d4012 (patch) | |
tree | 5cb4e17313f1d01f13fa86f9887628246a5c49eb /jstests | |
parent | 1ede17a6b615eaf742ce97fc92c31680601d71c5 (diff) | |
download | mongo-737bb20fcb9176eb5f664bd874cdaece779d4012.tar.gz |
SERVER-20935 do not attempt to attach shard version to OpCtx inside direct client
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/aggregation/bugs/server7781.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jstests/aggregation/bugs/server7781.js b/jstests/aggregation/bugs/server7781.js index 9a3520bab22..c369ddccbe0 100644 --- a/jstests/aggregation/bugs/server7781.js +++ b/jstests/aggregation/bugs/server7781.js @@ -116,6 +116,21 @@ function test(db, sharded, indexType) { aggCmd.$geoNear.near = queryPoint; aggArr = [aggCmd, {$limit: 50}, {$limit:60}, {$limit:40}]; checkOutput(db.runCommand(geoCmd), db[coll].aggregate(aggArr), 40); + + // Test $geoNear with an initial batchSize of 0. Regression test for SERVER-20935. + queryPoint = pointMaker.mkPt(0.25); + geoCmd.spherical = true; + geoCmd.near = queryPoint; + geoCmd.limit = 70; + delete geoCmd.num; + aggCmd.$geoNear.spherical = true; + aggCmd.$geoNear.near = queryPoint; + aggCmd.$geoNear.limit = 70; + delete aggCmd.$geoNear.num; + var cmdRes = db[coll].runCommand("aggregate", {pipeline: [aggCmd], cursor: {batchSize: 0}}); + assert.commandWorked(cmdRes); + var cmdCursor = new DBCommandCursor(db[coll].getMongo(), cmdRes, 0); + checkOutput(db.runCommand(geoCmd), cmdCursor, 70); } test(db, false, '2d'); |