From b5e8413c3ffa0d62126cd2ed2de3460299556f32 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 25 Jan 2017 09:15:25 -0800 Subject: [PATCH] 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 Reviewed-By: Santiago Gimeno Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca --- test/parallel/test-child-process-spawnsync-timeout.js | 5 ++--- 1 file 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 abebe41e6e9640..38f22deef26ae7 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);