summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-spawnsync-timeout.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-01-25 09:15:25 -0800
committerRich Trott <rtrott@gmail.com>2017-01-27 12:03:06 -0800
commitb6d2fc9b0f6a896462fe3e78cf95e48ecef59053 (patch)
treed05b03a0053142b15dfe0f6987914bb9cbd8768f /test/parallel/test-child-process-spawnsync-timeout.js
parentc74e6fe651a763f9c6be00a2908af8b703bd5976 (diff)
downloadnode-new-b6d2fc9b0f6a896462fe3e78cf95e48ecef59053.tar.gz
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: https://github.com/nodejs/node/pull/10998 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-spawnsync-timeout.js')
-rw-r--r--test/parallel/test-child-process-spawnsync-timeout.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-child-process-spawnsync-timeout.js b/test/parallel/test-child-process-spawnsync-timeout.js
index abebe41e6e..38f22deef2 100644
--- a/test/parallel/test-child-process-spawnsync-timeout.js
+++ b/test/parallel/test-child-process-spawnsync-timeout.js
@@ -1,11 +1,11 @@
'use strict';
-require('../common');
+const common = require('../common');
const assert = require('assert');
const spawnSync = require('child_process').spawnSync;
const TIMER = 200;
-const SLEEP = 5000;
+const SLEEP = common.platformTimeout(5000);
switch (process.argv[2]) {
case 'child':
@@ -19,7 +19,6 @@ switch (process.argv[2]) {
const ret = spawnSync(process.execPath, [__filename, 'child'],
{timeout: TIMER});
assert.strictEqual(ret.error.errno, 'ETIMEDOUT');
- console.log(ret);
const end = Date.now() - start;
assert(end < SLEEP);
assert(ret.status > 128 || ret.signal);