summaryrefslogtreecommitdiff
path: root/jstests/aggregation
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2013-08-15 17:47:17 -0400
committerMathias Stearn <mathias@10gen.com>2013-08-19 19:00:48 -0400
commitafffc8aee9f8c8b46d8ef6b5dd4197a9dcff42bb (patch)
treeec50536bb902192506c8063524531472ffcb5c2c /jstests/aggregation
parentf8e37b3b9daffbb721e231bc4418b6c7aac93e8d (diff)
downloadmongo-afffc8aee9f8c8b46d8ef6b5dd4197a9dcff42bb.tar.gz
SERVER-10530 Break first batch in aggregation cursor when encountering a large document
Diffstat (limited to 'jstests/aggregation')
-rw-r--r--jstests/aggregation/bugs/server10530.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/aggregation/bugs/server10530.js b/jstests/aggregation/bugs/server10530.js
new file mode 100644
index 00000000000..8071927844b
--- /dev/null
+++ b/jstests/aggregation/bugs/server10530.js
@@ -0,0 +1,13 @@
+// SERVER-10530 Would error if large objects are in first batch
+
+var t = db.server10530;
+t.drop();
+
+t.insert({big: Array(1024*1024).toString()});
+t.insert({big: Array(16*1024*1024 - 1024).toString()});
+t.insert({big: Array(1024*1024).toString()});
+
+assert.eq(t.aggregateCursor().itcount(), 3);
+
+// clean up large collection
+t.drop();