summaryrefslogtreecommitdiff
path: root/jstests/aggregation/mongos_merge.js
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2017-08-28 15:10:42 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2017-09-01 15:36:35 -0400
commitbc3e230523e4677e2f3fed64ea89c369182a9272 (patch)
treebb35904e784f224e6d5ab87b508c69c72f447dd3 /jstests/aggregation/mongos_merge.js
parent4e01e3582541fc00ec2e83c97cac89b59fbfeb34 (diff)
downloadmongo-bc3e230523e4677e2f3fed64ea89c369182a9272.tar.gz
SERVER-30704 Use ARM to merge agg cursors on mongos.
Diffstat (limited to 'jstests/aggregation/mongos_merge.js')
-rw-r--r--jstests/aggregation/mongos_merge.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/jstests/aggregation/mongos_merge.js b/jstests/aggregation/mongos_merge.js
index fe13b337930..fd49ef4c7e5 100644
--- a/jstests/aggregation/mongos_merge.js
+++ b/jstests/aggregation/mongos_merge.js
@@ -229,5 +229,22 @@
expectedCount: 100
});
+ // Test that a pipeline whose merging half can be run on mongos using only the mongos execution
+ // machinery returns the correct results.
+ assertMergeOnMongoS({
+ testName: "agg_mongos_merge_all_mongos_runnable_skip_and_limit_stages",
+ pipeline: [
+ {$match: {_id: {$gte: -5, $lte: 100}}},
+ {$sort: {_id: -1}},
+ {$skip: 5},
+ {$limit: 10},
+ {$skip: 5},
+ {$limit: 1},
+ ],
+ batchSize: 10,
+ expectedCount: 1
+ });
+ // TODO SERVER-30882 Find a way to assert that all stages get absorbed by mongos.
+
st.stop();
-})(); \ No newline at end of file
+})();