Skip to content

Commit a0492ba

Browse files
Trottjasnell
authored andcommitted
test: fix test-vm-memleak for high baseline platforms
test-vm-memleak always fails on AIX in CI because the test checks that total memory consumption is less than 64 Mb, but AIX uses over 100 Mb just as a baseline. So instead, let's compare the memory consumption to the baseline and make sure it is within 32 Mb. PR-URL: #38062 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Ash Cripps <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 30d7f05 commit a0492ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/pummel/test-vm-memleak.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ require('../common');
2626
const assert = require('assert');
2727
const vm = require('vm');
2828

29+
const baselineRss = process.memoryUsage.rss();
30+
2931
const start = Date.now();
3032

3133
const interval = setInterval(function() {
@@ -36,8 +38,8 @@ const interval = setInterval(function() {
3638

3739
global.gc();
3840
const rss = process.memoryUsage.rss();
39-
assert.ok(rss < 64 * 1024 * 1024,
40-
`memory usage: ${rss} (${Math.round(rss / (1024 * 1024))} MB)`);
41+
assert.ok(rss < baselineRss + 32 * 1024 * 1024,
42+
`memory usage: ${rss} baseline: ${baselineRss}`);
4143

4244
// Stop after 5 seconds.
4345
if (Date.now() - start > 5 * 1000) {

0 commit comments

Comments
 (0)