JSON.stringify(error) no longer contains message, ensure child exits promptly

This commit is contained in:
akhil 2014-06-03 10:34:27 -07:00
parent 7c4b95db3b
commit 83de95f5e3
3 changed files with 15 additions and 10 deletions

View File

@ -385,6 +385,7 @@
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-tls-ci-reneg-attack.js"/>
<!-- test/fixtures -->
<apply-diff src="test/fixtures" mod="${test.dir}/fixtures" name="create-file.js"/>
<apply-diff src="test/fixtures" mod="${test.dir}/fixtures" name="catch-stdout-error.js"/>
</target>
<!-- keep sorted and synchronized with diff-source-files -->
@ -493,6 +494,7 @@
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-tls-ci-reneg-attack.js"/>
<!-- test/fixtures -->
<apply-patch-file target="${test.dir}/fixtures" dir="test/fixtures" name="create-file.js"/>
<apply-patch-file target="${test.dir}/fixtures" dir="test/fixtures" name="catch-stdout-error.js"/>
</target>
<target name="generate-policy-file" depends="init">

View File

@ -0,0 +1,10 @@
--- ../node/test/fixtures/catch-stdout-error.js 2014-06-03 10:30:09.744817257 -0700
+++ test/fixtures/catch-stdout-error.js 2014-06-03 10:18:54.049568912 -0700
@@ -33,6 +33,7 @@
process.stdout.on('error', function(er) {
console.error(JSON.stringify(er));
process.exit(42);
+ java.lang.System.exit(42);
});
write();

View File

@ -1,6 +1,6 @@
--- ../nodejs/test/simple/test-stdout-close-catch.js 2014-01-07 15:32:53.556005400 -0800
+++ test/simple/test-stdout-close-catch.js 2014-01-07 16:20:47.154233600 -0800
@@ -28,14 +28,15 @@
--- ../node/test/simple/test-stdout-close-catch.js 2014-06-03 10:30:02.920806600 -0700
+++ test/simple/test-stdout-close-catch.js 2014-06-03 10:28:16.616549766 -0700
@@ -28,9 +28,9 @@
var testScript = path.join(common.fixturesDir, 'catch-stdout-error.js');
@ -12,10 +12,3 @@
'-pe "process.exit(1);"';
var child = child_process.exec(cmd);
var output = '';
-var outputExpect = { 'code': 'EPIPE',
+var outputExpect = { 'message' : 'write EPIPE',
+ 'code': 'EPIPE',
'errno': 'EPIPE',
'syscall': 'write' };