Skip to content

Commit b5e8413

Browse files
Trottevanlucas
authored andcommitted
test: allow for slow hosts in spawnSync() test
test-child-process-spawnsync-timeout failed from time to time on Raspberry Pi devices. Use common.platformTimeout() to allow a little more time to run on resource-constrained hosts. PR-URL: #10998 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 062c851 commit b5e8413

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/parallel/test-child-process-spawnsync-timeout.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const assert = require('assert');
44

55
const spawnSync = require('child_process').spawnSync;
66

77
const TIMER = 200;
8-
const SLEEP = 5000;
8+
const SLEEP = common.platformTimeout(5000);
99

1010
switch (process.argv[2]) {
1111
case 'child':
@@ -19,7 +19,6 @@ switch (process.argv[2]) {
1919
const ret = spawnSync(process.execPath, [__filename, 'child'],
2020
{timeout: TIMER});
2121
assert.strictEqual(ret.error.errno, 'ETIMEDOUT');
22-
console.log(ret);
2322
const end = Date.now() - start;
2423
assert(end < SLEEP);
2524
assert(ret.status > 128 || ret.signal);

0 commit comments

Comments
 (0)