X Tutup
The Wayback Machine - https://web.archive.org/web/20230218233921/https://github.com/nodejs/node/commit/4c5eff91ef
Skip to content
Permalink
Browse files
test: increase wiggle room for memory in test-worker-resource-limits
PR-URL: #37901
Fixes: #37844
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Trott authored and targos committed May 1, 2021
1 parent f055faf commit 4c5eff9
Showing 1 changed file with 3 additions and 2 deletions.
@@ -35,9 +35,10 @@ if (!process.env.HAS_STARTED_WORKER) {
assert.deepStrictEqual(resourceLimits, testResourceLimits);
const array = [];
while (true) {
// Leave 10 % wiggle room here.
// Leave 10% wiggle room here, and 20% on debug builds.
const wiggleRoom = common.buildType === 'Release' ? 1.1 : 1.2;
const usedMB = v8.getHeapStatistics().used_heap_size / 1024 / 1024;
assert(usedMB < resourceLimits.maxOldGenerationSizeMb * 1.1);
assert(usedMB < resourceLimits.maxOldGenerationSizeMb * wiggleRoom);

let seenSpaces = 0;
for (const { space_name, space_size } of v8.getHeapSpaceStatistics()) {

0 comments on commit 4c5eff9

Please sign in to comment.
X Tutup