-
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: refactoring and cleanup on child-process tests #32078
Conversation
07b1131
to
52df9f5
Compare
test |
Interesting... it's passing locally for me. Will investigate. |
This comment has been minimized.
This comment has been minimized.
Looks like one of the events in question is not emitted consistently across platforms. Trying again. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8b557b8
to
27c8456
Compare
Finally, a good CI run. Turns out the actual emission of events in |
I assumed this would have landed already, and was just searching for the debug utility, with no luck. We really need to be able to leave debug messages in tests, ones that normally have no output, but where the output can be turned on. Every time I have to debug a test I start by injecting console.log statements into them so I know where they are failing... then delete them before PRing. Its not a good way to do things. If the PR is stalled on the stability of tests, maybe the base feature can be PRed on its own? |
@sam-github I think it's stalled on this alternate proposal: #32078 (comment) |
This comment has been minimized.
This comment has been minimized.
27c8456
to
bd51d52
Compare
Went head and removed the |
PR-URL: #32078 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Landed in d0c0e20 |
PR-URL: #32078 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: nodejs#32078 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #32078 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This makes sure all usages of `util.debuglog()` must contain the string 'test' as argument. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
These rules only apply for the test folder and will already be checked for. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This makes sure all usages of `util.debuglog()` must contain the string 'test' as argument. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
These rules only apply for the test folder and will already be checked for. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This makes sure all usages of `util.debuglog()` must contain the string 'test' as argument. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
These rules only apply for the test folder and will already be checked for. PR-URL: #32161 Refs: #32078 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Commit 1 in this scratches an itch I've had for a while: it adds acommon.debug()
totest/common/index.js
that usesutil.debuglog()
as a way of avoiding use ofconsole.log()
statements in tests that are not part of the test itself.To enable the debug output while running tests, set the environment variableNODE_DEBUG=test
.Commit 2Makes a number of improvements to child process tests including use of thedebuglog()
, more must calls, and use of../common/countdown
where appropriate.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes