Uh oh!
There was an error while loading. Please reload this page.
Add two child-process stdio flush tests - #7257
Conversation
While commit 12274a5 fixed data loss when a readable event handler is attached, the problem still exists when the stdio stream has a piped consumer that doesn't read fast enough. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
In order for the testcase to fail, the calls to read() must be done after 'exit' is emitted and after flushStdio has been called. With this change, the testcase will catch any regressions on this issue. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
addaleax
commented
Jun 10, 2016
@petrosagg Thanks, this is appreciated a lot! It would be great if we could replace spawning The subject line of the first commit should also probably start with |
addaleax
commented
Jun 10, 2016
mscdex
commented
Jun 11, 2016
addaleax
commented
Jun 11, 2016
addaleax
commented
Jun 11, 2016
@mscdex Okay, so, apparently the order of some child-process-related I/O events changed in libuv/libuv#611, making the test work even without your fix from #5036… would that make sense to you? |
mscdex
commented
Jun 11, 2016
@addaleax if that's the case, then I'm fine with that change |
| function spawnWithPipe() { | ||
| const buffer = []; | ||
| const through = new stream.PassThrough(); | ||
| const p = cp.spawn('seq', [ '36000' ]); |
There was a problem hiding this comment.
Can you remove the spaces inside the square braces.
addaleax
commented
Jun 14, 2016
Initial CI (rebased against master to include #7160): https://ci.nodejs.org/job/node-test-commit/3741/ |
addaleax
commented
Jun 15, 2016
CI is red with timeouts in |
addaleax
commented
Jun 23, 2016
ping @petrosagg The test timeouts seem to stem from I’m not sure how that’s best addressed. Killing the child process after a short timeout seems a bit crude, but it’s the most reliable thing that comes to my mind right now. |
addaleax
commented
Jul 4, 2016
@petrosagg Still interested in pursuing this? I’d definitely like to get these tests in in some way, and if you’re not feeling like it, I’d like to offer to take over. |
c133999 to
83c7a88Comparejasnell
commented
Mar 1, 2017
ping @addaleax ... still interested in pursuing this? |
addaleax
commented
Mar 1, 2017
yeah let’s close this out, the underlying issues in the streams implementation have been fixed & have tests |
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
child-process
Description of change
Fixed a previous testcase that wasn't actually triggering the condition it tried to test. Added a new test that needs #7160 to be merged for it to pass.