Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: allow for slow hosts in spawnSync() test #10998

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/parallel/test-child-process-spawnsync-timeout.js
Original file line number Diff line number Diff line change
@@ -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':
Expand All @@ -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);
Expand Down