Files
mongo/jstests/aggregation/exec/agg_split_large_objs_across_batches.js
Mihai Andrei eb8bef604c SERVER-99734 Finish moving top level tests in 'jstests/aggregation' into subdirectories (#31578)
GitOrigin-RevId: 2dd0c4d3698dfc4ccb1d7069d214aa6b66f28234
2025-02-03 16:27:34 +00:00

14 lines
414 B
JavaScript

// SERVER-10530 Would error if large objects are in first batch
const t = db[jsTestName()];
t.drop();
assert.commandWorked(t.insert({big: Array(1024 * 1024).toString()}));
assert.commandWorked(t.insert({big: Array(16 * 1024 * 1024 - 1024).toString()}));
assert.commandWorked(t.insert({big: Array(1024 * 1024).toString()}));
assert.eq(t.aggregate().itcount(), 3);
// clean up large collection
assert(t.drop());