Skip to content

Commit

Permalink
test: increase RAM requirement for intensive tests
Browse files Browse the repository at this point in the history
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: nodejs#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]>
  • Loading branch information
Trott committed Jul 20, 2016
1 parent 74f0943 commit 135a863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.isLinuxPPCBE = (process.platform === 'linux') &&
exports.isSunOS = process.platform === 'sunos';
exports.isFreeBSD = process.platform === 'freebsd';

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

function rimrafSync(p) {
Expand Down
7 changes: 7 additions & 0 deletions test/parallel/test-fs-readfile-tostring-fail.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
'use strict';

const common = require('../common');

if (!common.enoughTestMem) {
const skipMessage = 'intensive toString tests due to memory confinements';
common.skip(skipMessage);
return;
}

const assert = require('assert');
const fs = require('fs');
const path = require('path');
Expand Down

0 comments on commit 135a863

Please sign in to comment.