-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: decrease duration of test-cli-syntax #14187
Conversation
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child processes, but using spawnSync, which made the test run each child process serially. This switches most of the test cases to use exec so that they are asynchronous. Locally, the test went from > 5 seconds to under 2 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Like the other changes to address the slowdown caused by disabling snapshots I'd suggest we expedite landing this one as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 Nit
@@ -2,7 +2,7 @@ | |||
|
|||
const common = require('../common'); | |||
const assert = require('assert'); | |||
const spawnSync = require('child_process').spawnSync; | |||
const {exec, spawnSync} = require('child_process'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space inside the curly braces #14162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a lint rule? If so, when did that change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a lint rule? If so, when did that change?
about to land...
Why not refactor the other two uses of |
@refack they use spawnSync's |
Trying CI one more time https://ci.nodejs.org/job/node-test-pull-request/9108/ |
CI was good landing. |
Landed as a74ddff |
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child processes, but using spawnSync, which made the test run each child process serially. This switches most of the test cases to use exec so that they are asynchronous. Locally, the test went from > 5 seconds to under 2 seconds. PR-URL: #14187 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Ah thanks @mhdawson. I meant to land this morning but forgot about it. :] |
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child processes, but using spawnSync, which made the test run each child process serially. This switches most of the test cases to use exec so that they are asynchronous. Locally, the test went from > 5 seconds to under 2 seconds. PR-URL: #14187 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child processes, but using spawnSync, which made the test run each child process serially. This switches most of the test cases to use exec so that they are asynchronous. Locally, the test went from > 5 seconds to under 2 seconds. PR-URL: #14187 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This does not land cleanly in LTS. Please feel free to manually backport by following the guide. Please also feel free to replace do-not-land if it is being backported |
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child processes, but using spawnSync, which made the test run each child process serially. This switches most of the test cases to use exec so that they are asynchronous. Locally, the test went from > 5 seconds to under 2 seconds. PR-URL: #14187 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child
processes, but using spawnSync, which made the test run each child
process serially. This switches most of the test cases to use exec so
that they are asynchronous. Locally, the test went from > 5 seconds to
under 2 seconds.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test