Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix child_process testcase to actually detect regression #7774

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

This is taken verbatim from #7257, with the original author not responding. After libuv/libuv#611 changed the relative timing of events upon child process exit, the test case from #5036 needs a setImmediate() inserted to actually detect the original regression.

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 addaleax added child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests. labels Jul 17, 2016
@addaleax addaleax changed the title test: fix testcase to actually detect regression test: fix child_process testcase to actually detect regression Jul 17, 2016
@bnoordhuis
Copy link
Member

Do I understand correctly that the tests checks that calling .read() until after the child process has terminated works? If that is the case, can you add an explanatory comment? It's not obvious from looking at just the code changes, IMO.

@Fishrock123
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants