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

Revert "test: reduce runtime" #20927

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
14 changes: 6 additions & 8 deletions test/parallel/test-async-wrap-pop-id-during-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ if (process.argv[2] === 'async') {
fn();
throw new Error();
}
return (async function() { await fn(); })();
(async function() { await fn(); })();
// While the above should error, just in case it doesn't the script shouldn't
// fork itself indefinitely so return early.
return;
}

const assert = require('assert');
const { spawnSync } = require('child_process');

const ret = spawnSync(
process.execPath,
['--stack_size=50', __filename, 'async']
);
const ret = spawnSync(process.execPath, [__filename, 'async']);
assert.strictEqual(ret.status, 0);
const stderr = ret.stderr.toString('utf8', 0, 2048);
assert.ok(!/async.*hook/i.test(stderr));
assert.ok(stderr.includes('UnhandledPromiseRejectionWarning: Error'), stderr);
assert.ok(!/async.*hook/i.test(ret.stderr.toString('utf8', 0, 1024)));
8 changes: 4 additions & 4 deletions test/parallel/test-child-process-exec-encoding.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const cp = require('child_process');
const stdoutData = 'foo';
const stderrData = 'bar';
const expectedStdout = `${stdoutData}\n`;
const expectedStderr = `${stderrData}\n`;

if (process.argv[2] === 'child') {
// The following console calls are part of the test.
console.log(stdoutData);
console.error(stderrData);
} else {
const assert = require('assert');
const cp = require('child_process');
const expectedStdout = `${stdoutData}\n`;
const expectedStderr = `${stderrData}\n`;
function run(options, callback) {
const cmd = `"${process.execPath}" "${__filename}" child`;

Expand Down