0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-domain-no-error-handler-abort-on-uncaught-2.js
Joyee Cheung a1652324cd test: reduce unmanaged parallelism in domain test
The original test lauches 10 child processes at once
and bypass `test.py`'s process regulation.
This PR reduces the unmanaged parallelism and is a
temporary workaround for #9979 (not a real fix).

PR-URL: https://github.com/nodejs/node/pull/10329
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-21 21:14:51 -08:00

21 lines
329 B
JavaScript

'use strict';
const common = require('../common');
const domain = require('domain');
function test() {
const d = domain.create();
d.run(function() {
setTimeout(function() {
throw new Error('boom!');
}, 1);
});
}
if (process.argv[2] === 'child') {
test();
} else {
common.childShouldThrowAndAbort();
}