Skip to content

Commit 7fb4794

Browse files
Trottevanlucas
authored andcommitted
test: increase RAM requirement for intensive tests
test-fs-read-buffer-tostring-fail and test-fs-readfile-tostring-fail have been timing out on Raspberry Pi 3 devices on the continuous integration server. These devices have 1 Gb of RAM and the tests are memory intensive. Previous checks for memory intensive tests used a 512 Mb cut-off, but that was probably instituted when we only had Pi 1 devices. Consequently, this change increases the threshold for memory-intensive tests to 1 Gb and adds that threshold to test-fs-readfile-tostring-fail. PR-URL: #7772 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 4839ef3 commit 7fb4794

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports.isLinuxPPCBE = (process.platform === 'linux') &&
2727
exports.isSunOS = process.platform === 'sunos';
2828
exports.isFreeBSD = process.platform === 'freebsd';
2929

30-
exports.enoughTestMem = os.totalmem() > 0x20000000; /* 512MB */
30+
exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */
3131
exports.rootDir = exports.isWindows ? 'c:\\' : '/';
3232

3333
function rimrafSync(p) {

test/parallel/test-fs-readfile-tostring-fail.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
'use strict';
22

33
const common = require('../common');
4+
5+
if (!common.enoughTestMem) {
6+
const skipMessage = 'intensive toString tests due to memory confinements';
7+
common.skip(skipMessage);
8+
return;
9+
}
10+
411
const assert = require('assert');
512
const fs = require('fs');
613
const path = require('path');

0 commit comments

Comments
 (0)