-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 test-debug-port-from-cmdline #2186
Conversation
This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes nodejs#2094 Fixes nodejs#2177
Thanks for the detailed explanation. I'll start the CI. UPDATE: CI https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/152/ |
CI is happy, with regards to this test anyway. |
fantastic @joaocgreis, great investigative work here LGTM there are 2 main persistent errors and one intermittent that are stopping greens in CI for this but there are unrelated to this change |
Awesome, this thing has been annoying me for a while. |
Also LGTM. Nice work @joaocgreis 👍 |
LGTM from me too. |
This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: #2177 Refs: #2094 PR-URL: #2186 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Alexis Campailla <[email protected]>
Thanks! Landed in 2b4b600 |
This change is a backport of 2b4b600 from io.js. Original commit message: This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: nodejs/node#2177 Refs: nodejs/node#2094 PR-URL: nodejs/node#2186 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Alexis Campailla <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> PR-URL: #25748
This change is a backport of 2b4b600 from io.js. Original commit message: This test was failing because the spawned process was terminated before anything could be done, by calling child.stdin.end. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with --interactive to process the command sent by the parent. The child is killed explicitly by the parent before it exits. This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit. Fixes: nodejs/node#2177 Refs: nodejs/node#2094 PR-URL: nodejs/node#2186 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Alexis Campailla <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> PR-URL: nodejs#25748
test-debug-port-from-cmdline.js
has been failing occasionally with unclear errors in Windows and silently (false positive) in Linux.Errors found in Windows:
Note that in case of success it should always display two lines of output:
This test was failing because the spawned process was terminated before anything could be done, by calling
child.stdin.end
. With this change, the child's stdin is no longer closed. When the stdin is not a tty, io.js waits for the whole input before starting, so the child must be run with--interactive
to process the command sent by the parent. The child is killed explicitly by the parent before it exits.This test was failing silently because the asserts were not called if nothing was received from the child. This fix moves assertOutputLines to always run on exit.
Fixes #2094
Fixes #2177