diff options
author | Jason Carey <jcarey@argv.me> | 2017-09-29 12:18:53 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2017-10-03 16:50:12 -0400 |
commit | f23002e965d29158505575d09432faf403efcb56 (patch) | |
tree | 5794d12d94376b7cc55186862e4a43d850cab4d5 /jstests/noPassthroughWithMongod | |
parent | 8a4b356682d9a3d39049c2d51ac4f10ed1e6d07e (diff) | |
download | mongo-f23002e965d29158505575d09432faf403efcb56.tar.gz |
SERVER-30848 make shell getMores use sessions
The shell should attach the logical session used to initiate cursors
(via find or aggregate) and use it for successive getMores.
Diffstat (limited to 'jstests/noPassthroughWithMongod')
-rw-r--r-- | jstests/noPassthroughWithMongod/find_cmd.js | 4 | ||||
-rw-r--r-- | jstests/noPassthroughWithMongod/parallel_collection_scan.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthroughWithMongod/find_cmd.js b/jstests/noPassthroughWithMongod/find_cmd.js index 31d3311832c..6ca536972c6 100644 --- a/jstests/noPassthroughWithMongod/find_cmd.js +++ b/jstests/noPassthroughWithMongod/find_cmd.js @@ -39,7 +39,7 @@ assert.commandWorked(res); assert.neq(0, res.cursor.id); assert.eq(101, res.cursor.firstBatch.length); -cursor = new DBCommandCursor(coll.getDB().getMongo(), res); +cursor = new DBCommandCursor(coll.getDB(), res); assert.eq(cursor.itcount(), 140); // Command doesn't parse. @@ -50,4 +50,4 @@ assert.commandFailed(coll.runCommand("find", {projection: {_id: 0}, filter: {$fo // Special command namespace. assert.commandFailed(coll.getDB().runCommand({find: "$cmd"})); -assert.commandFailed(coll.getDB().runCommand({find: "$cmd.sys.inprog"}));
\ No newline at end of file +assert.commandFailed(coll.getDB().runCommand({find: "$cmd.sys.inprog"})); diff --git a/jstests/noPassthroughWithMongod/parallel_collection_scan.js b/jstests/noPassthroughWithMongod/parallel_collection_scan.js index 11fa5d0bd75..b0547592cb9 100644 --- a/jstests/noPassthroughWithMongod/parallel_collection_scan.js +++ b/jstests/noPassthroughWithMongod/parallel_collection_scan.js @@ -18,7 +18,7 @@ function iterateSliced() { var count = 0; for (var i = 0; i < res.cursors.length; i++) { var x = res.cursors[i]; - var cursor = new DBCommandCursor(db.getMongo(), x, 5); + var cursor = new DBCommandCursor(db, x, 5); count += cursor.itcount(); } |