summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2019-12-13 18:38:36 +0000
committerevergreen <evergreen@mongodb.com>2019-12-13 18:38:36 +0000
commit77a11f8bb1d9085b6276b034598b5c5fe47512a5 (patch)
treef112d605432bb99d07889cb49d9cde916e83be56 /jstests
parent34e32dfd5562e00d416ca7a49e6a45d1e9fa2239 (diff)
downloadmongo-77a11f8bb1d9085b6276b034598b5c5fe47512a5.tar.gz
SERVER-45104 Fix spill_to_disk.js
Diffstat (limited to 'jstests')
-rw-r--r--jstests/aggregation/spill_to_disk.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/jstests/aggregation/spill_to_disk.js b/jstests/aggregation/spill_to_disk.js
index 0c3ab5e703d..90a3451ab77 100644
--- a/jstests/aggregation/spill_to_disk.js
+++ b/jstests/aggregation/spill_to_disk.js
@@ -7,18 +7,14 @@
(function() {
'use strict';
- load('jstests/libs/fixture_helpers.js'); // For 'FixtureHelpers'
-
const coll = db.spill_to_disk;
coll.drop();
- const sharded = FixtureHelpers.isSharded(coll);
-
- const memoryLimitMB = sharded ? 200 : 100;
+ const memoryLimitMB = 100;
const bigStr = Array(1024 * 1024 + 1).toString(); // 1MB of ','
for (let i = 0; i < memoryLimitMB + 1; i++)
- coll.insert({_id: i, bigStr: i + bigStr, random: Math.random()});
+ coll.insert({_id: i.toString(), bigStr: i + bigStr, random: Math.random()});
assert.gt(coll.stats().size, memoryLimitMB * 1024 * 1024);
@@ -107,10 +103,7 @@
canSpillToDisk: false
});
test({
- pipeline: [{
- $group:
- {_id: null, bigArray: {$addToSet: {$concat: ['$bigStr', {$toString: "$_id"}]}}}
- }],
+ pipeline: [{$group: {_id: null, bigArray: {$addToSet: {$concat: ['$bigStr', "$_id"]}}}}],
expectedCodes: [groupCode, ErrorCodes.ExceededMemoryLimit],
canSpillToDisk: false
});