From 25d4b5b1e9fd9a28d1f65b088cee96b2c826ba79 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 5 Apr 2016 19:08:01 +0200 Subject: [PATCH] test: move some test from sequential to parallel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only test with modifications is `test-stdin-child-proc` that was passing when it should not because the exit code of the child process was not being checked. PR-URL: https://github.com/nodejs/node/pull/6087 Reviewed-By: Colin Ihrig Reviewed-By: Johan Bergström Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Claudio Rodriguez --- test/{sequential => parallel}/test-debug-args.js | 0 test/{sequential => parallel}/test-force-repl.js | 0 test/{sequential => parallel}/test-net-localport.js | 0 .../test-regress-GH-1531.js | 0 .../test-regress-GH-1899.js | 1 - .../test-regress-GH-4948.js | 0 .../{sequential => parallel}/test-regress-GH-746.js | 1 - .../test-socket-write-after-fin-error.js | 0 .../test-socket-write-after-fin.js | 0 test/parallel/test-stdin-child-proc.js | 13 +++++++++++++ .../test-stdin-pipe-resume.js | 1 - .../test-stdin-script-child.js | 0 ...st-stdout-cannot-be-closed-child-process-pipe.js | 0 .../{sequential => parallel}/test-stdout-to-file.js | 0 test/{sequential => parallel}/test-sync-fileread.js | 0 .../test-vm-syntax-error-stderr.js | 0 .../test-zerolengthbufferbug.js | 1 - test/sequential/test-stdin-child-proc.js | 8 -------- 18 files changed, 13 insertions(+), 12 deletions(-) rename test/{sequential => parallel}/test-debug-args.js (100%) rename test/{sequential => parallel}/test-force-repl.js (100%) rename test/{sequential => parallel}/test-net-localport.js (100%) rename test/{sequential => parallel}/test-regress-GH-1531.js (100%) rename test/{sequential => parallel}/test-regress-GH-1899.js (99%) rename test/{sequential => parallel}/test-regress-GH-4948.js (100%) rename test/{sequential => parallel}/test-regress-GH-746.js (99%) rename test/{sequential => parallel}/test-socket-write-after-fin-error.js (100%) rename test/{sequential => parallel}/test-socket-write-after-fin.js (100%) create mode 100644 test/parallel/test-stdin-child-proc.js rename test/{sequential => parallel}/test-stdin-pipe-resume.js (99%) rename test/{sequential => parallel}/test-stdin-script-child.js (100%) rename test/{sequential => parallel}/test-stdout-cannot-be-closed-child-process-pipe.js (100%) rename test/{sequential => parallel}/test-stdout-to-file.js (100%) rename test/{sequential => parallel}/test-sync-fileread.js (100%) rename test/{sequential => parallel}/test-vm-syntax-error-stderr.js (100%) rename test/{sequential => parallel}/test-zerolengthbufferbug.js (99%) delete mode 100644 test/sequential/test-stdin-child-proc.js diff --git a/test/sequential/test-debug-args.js b/test/parallel/test-debug-args.js similarity index 100% rename from test/sequential/test-debug-args.js rename to test/parallel/test-debug-args.js diff --git a/test/sequential/test-force-repl.js b/test/parallel/test-force-repl.js similarity index 100% rename from test/sequential/test-force-repl.js rename to test/parallel/test-force-repl.js diff --git a/test/sequential/test-net-localport.js b/test/parallel/test-net-localport.js similarity index 100% rename from test/sequential/test-net-localport.js rename to test/parallel/test-net-localport.js diff --git a/test/sequential/test-regress-GH-1531.js b/test/parallel/test-regress-GH-1531.js similarity index 100% rename from test/sequential/test-regress-GH-1531.js rename to test/parallel/test-regress-GH-1531.js diff --git a/test/sequential/test-regress-GH-1899.js b/test/parallel/test-regress-GH-1899.js similarity index 99% rename from test/sequential/test-regress-GH-1899.js rename to test/parallel/test-regress-GH-1899.js index 98396aae13..3f9d936e63 100644 --- a/test/sequential/test-regress-GH-1899.js +++ b/test/parallel/test-regress-GH-1899.js @@ -17,4 +17,3 @@ child.on('exit', function(code, signal) { assert.equal(code, 0); assert.equal(output, 'hello, world!\n'); }); - diff --git a/test/sequential/test-regress-GH-4948.js b/test/parallel/test-regress-GH-4948.js similarity index 100% rename from test/sequential/test-regress-GH-4948.js rename to test/parallel/test-regress-GH-4948.js diff --git a/test/sequential/test-regress-GH-746.js b/test/parallel/test-regress-GH-746.js similarity index 99% rename from test/sequential/test-regress-GH-746.js rename to test/parallel/test-regress-GH-746.js index 4b79f3c4e3..0070be30f8 100644 --- a/test/sequential/test-regress-GH-746.js +++ b/test/parallel/test-regress-GH-746.js @@ -27,4 +27,3 @@ server.listen(common.PORT, function() { process.on('exit', function() { assert.ok(accepted); }); - diff --git a/test/sequential/test-socket-write-after-fin-error.js b/test/parallel/test-socket-write-after-fin-error.js similarity index 100% rename from test/sequential/test-socket-write-after-fin-error.js rename to test/parallel/test-socket-write-after-fin-error.js diff --git a/test/sequential/test-socket-write-after-fin.js b/test/parallel/test-socket-write-after-fin.js similarity index 100% rename from test/sequential/test-socket-write-after-fin.js rename to test/parallel/test-socket-write-after-fin.js diff --git a/test/parallel/test-stdin-child-proc.js b/test/parallel/test-stdin-child-proc.js new file mode 100644 index 0000000000..35ae0c99d3 --- /dev/null +++ b/test/parallel/test-stdin-child-proc.js @@ -0,0 +1,13 @@ +'use strict'; +// This tests that pausing and resuming stdin does not hang and timeout +// when done in a child process. See test/parallel/test-stdin-pause-resume.js +const common = require('../common'); +const assert = require('assert'); +const child_process = require('child_process'); +const path = require('path'); +const cp = child_process.spawn(process.execPath, + [path.resolve(__dirname, 'test-stdin-pause-resume.js')]); + +cp.on('exit', common.mustCall((code) => { + assert.equal(code, 0); +})); diff --git a/test/sequential/test-stdin-pipe-resume.js b/test/parallel/test-stdin-pipe-resume.js similarity index 99% rename from test/sequential/test-stdin-pipe-resume.js rename to test/parallel/test-stdin-pipe-resume.js index cd409a1d23..cb28807045 100644 --- a/test/sequential/test-stdin-pipe-resume.js +++ b/test/parallel/test-stdin-pipe-resume.js @@ -25,4 +25,3 @@ if (process.argv[2] === 'child') { child.stdin.end(); }, 10); } - diff --git a/test/sequential/test-stdin-script-child.js b/test/parallel/test-stdin-script-child.js similarity index 100% rename from test/sequential/test-stdin-script-child.js rename to test/parallel/test-stdin-script-child.js diff --git a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js b/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js similarity index 100% rename from test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js rename to test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js diff --git a/test/sequential/test-stdout-to-file.js b/test/parallel/test-stdout-to-file.js similarity index 100% rename from test/sequential/test-stdout-to-file.js rename to test/parallel/test-stdout-to-file.js diff --git a/test/sequential/test-sync-fileread.js b/test/parallel/test-sync-fileread.js similarity index 100% rename from test/sequential/test-sync-fileread.js rename to test/parallel/test-sync-fileread.js diff --git a/test/sequential/test-vm-syntax-error-stderr.js b/test/parallel/test-vm-syntax-error-stderr.js similarity index 100% rename from test/sequential/test-vm-syntax-error-stderr.js rename to test/parallel/test-vm-syntax-error-stderr.js diff --git a/test/sequential/test-zerolengthbufferbug.js b/test/parallel/test-zerolengthbufferbug.js similarity index 99% rename from test/sequential/test-zerolengthbufferbug.js rename to test/parallel/test-zerolengthbufferbug.js index de36444180..c56240011d 100644 --- a/test/sequential/test-zerolengthbufferbug.js +++ b/test/parallel/test-zerolengthbufferbug.js @@ -34,4 +34,3 @@ process.on('exit', function() { assert.ok(gotResponse); assert.equal(0, resBodySize); }); - diff --git a/test/sequential/test-stdin-child-proc.js b/test/sequential/test-stdin-child-proc.js deleted file mode 100644 index 0189e94d5d..0000000000 --- a/test/sequential/test-stdin-child-proc.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -// This tests that pausing and resuming stdin does not hang and timeout -// when done in a child process. See test/simple/test-stdin-pause-resume.js -require('../common'); -var child_process = require('child_process'); -var path = require('path'); -child_process.spawn(process.execPath, - [path.resolve(__dirname, 'test-stdin-pause-resume.js')]);