-
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: simplify test skipping #14021
test: simplify test skipping #14021
Conversation
CI 2: https://ci.nodejs.org/job/node-test-pull-request/8911/ |
Sorting in the doc fixed. New CI: https://ci.nodejs.org/job/node-test-pull-request/8912/ Some unstable results due to flaky tests. |
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.
A few nits
@@ -81,7 +79,7 @@ function tryConnect() { | |||
if (host) | |||
tryConnect(); | |||
else { | |||
common.skip('no IPv6 localhost support'); | |||
common.printSkipMessage('no IPv6 localhost support'); |
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.
also I think this is a skip
(exiting will close the server, and also you can flip the order, server.close
then skip`
@@ -7,7 +7,6 @@ const spawn = require('child_process').spawn; | |||
if (common.isWindows) { | |||
common.skip('Win32 doesn\'t have signals, just a kind of ' + | |||
'emulation, insufficient for this test to apply.'); |
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.
should be just 'Win32 does not support signals.'
return common.skip('Windows does not have "ps" utility'); | ||
} | ||
if (common.isWindows) | ||
common.skip('Windows does not have "ps" utility'); |
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.
This is not true. I'll open an issue to fix this test.
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.
Are any actions from me required in this case for now?
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.
Not for this PR.
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.
Ref: #14039
Conflict resolved, comments addressed. CI: https://ci.nodejs.org/job/node-test-pull-request/8925/ Some results are unstable with flaky tests. |
For my sanity, I'd say in such huge PRs address the comments in a new commit (rebasing aside). Now I need to trust you or go over everything again 🤷♂️ |
Sorry. In addition to two files mentioned in your comments, the only Duly noted. |
@nodejs/collaborators, this PR changes a heavily used method from |
Also add common.printSkipMessage() for partial skips. Fixes: #14016
Conflict resolved in (due to cc1a47d):
|
I'm +0 on those changes, the benefit is marginal IMO and it adds churn but the end code is slightly cleaner. |
Landed in 2d2986a |
@vsemozhetbyt would you be able to backport this to v6.x? I totally missed this coming through or would have likely blocked on such a large churn going against the repo. With 330 files changed in this single commit we have a fairly huge delta now when backporting any future test refactors / changes. @Trott has been working on similar backports but submitted each subsystem or group of specific tests per PR, which makes it much easier to backport. In future if we are going to do such large churn can you please coordinate with @nodejs/lts and potentially get a backport ready in advance? |
@MylesBorins I shall try to backport and coordinate with @nodejs/lts for such PRs if there are any (I am personally a bit burdened already with my gloomy reputation as "king of churn"). |
@MylesBorins |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test, doc
Make
common.skip()
exit. Also addcommon.printSkipMessage()
for partial skips. Fixes: test: a small common.skip() improvement proposal #14016Don't make needless things before skip
PR is big but seems easy to skim. Maybe it would be more convenient to review it commit by commit.