summaryrefslogtreecommitdiff
path: root/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2016-12-19 12:19:18 +0800
committerRich Trott <rtrott@gmail.com>2016-12-21 21:14:51 -0800
commita1652324cd8cc77a1964286fa49900d89755ab0d (patch)
tree29ce7a04ebbc6e446aaceb752d7101549f0ffe89 /test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js
parent004a1002b8e3f4ca92097bd5d030407452a84527 (diff)
downloadandroid-node-v8-a1652324cd8cc77a1964286fa49900d89755ab0d.tar.gz
android-node-v8-a1652324cd8cc77a1964286fa49900d89755ab0d.tar.bz2
android-node-v8-a1652324cd8cc77a1964286fa49900d89755ab0d.zip
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>
Diffstat (limited to 'test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js')
-rw-r--r--test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js b/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js
new file mode 100644
index 0000000000..a4eebd50e9
--- /dev/null
+++ b/test/parallel/test-domain-no-error-handler-abort-on-uncaught-9.js
@@ -0,0 +1,27 @@
+'use strict';
+
+const common = require('../common');
+const domain = require('domain');
+
+function test() {
+ const d = domain.create();
+ const d2 = domain.create();
+
+ d.on('error', function errorHandler() {
+ });
+
+ d.run(function() {
+ d2.run(function() {
+ var fs = require('fs');
+ fs.exists('/non/existing/file', function onExists() {
+ throw new Error('boom!');
+ });
+ });
+ });
+}
+
+if (process.argv[2] === 'child') {
+ test();
+} else {
+ common.childShouldThrowAndAbort();
+}