GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve async hooks test error messages by addaleax · Pull Request #13243 · nodejs/node

Conversation

@addaleax

@addaleax addaleax commented May 26, 2017

Copy link
Copy Markdown
Member

Improve error messages in the async hooks tests, mostly by removing
unhelpful message parameters for assertions.

(@Trott, maybe we could have a lint rule that forbids literals as messages if this PR is somewhat well-received?)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test/async_hooks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@addaleax addaleax added async_hooks Issues and PRs related to the async hooks subsystem. dont-land-on-v4.x test Issues and PRs related to Node.js core tests and test infrastructure. labels May 26, 2017
@nodejs-github-bot nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. test Issues and PRs related to Node.js core tests and test infrastructure. labels May 26, 2017
@AndreasMadsen
AndreasMadsen requested a review from thlorenz May 26, 2017 17:37
kunalspathak
kunalspathak approved these changes May 26, 2017
View reviewed changes
AndreasMadsen
AndreasMadsen approved these changes May 27, 2017
View reviewed changes

@AndreasMadsen AndreasMadsen left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Rubber stamp LGTM

CI: https://ci.nodejs.org/job/node-test-pull-request/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@refack

refack commented May 29, 2017

Copy link
Copy Markdown
Contributor

From a partial scan I agree with 97% of removals.
Some might have value... like: assert.strictEqual(code, 1, 'exit code 1');
Would you wait a day or two before landing, I really want to review them all (It will be a shame to lose good information if it's in there)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented May 29, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

(@Trott, maybe we could have a lint rule that forbids literals as messages if this PR is somewhat well-received?)

Sounds good, but maybe a little bit more lax, like if it's more than n characters long, or has at least 4 white space groups (meaning 5 words), or has some keywords like should, it might be good as well.
[edit] meanwhile it should be communicated to Collaborators not to approve these sort of unhelpful messages, as they actually hide the default which is better.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig
cjihrig approved these changes May 29, 2017
View reviewed changes
@addaleax

addaleax commented May 29, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Some might have value... like: assert.strictEqual(code, 1, 'exit code 1');

I wouldn’t agree. exit code 1 is an unhelpful error message, because it just states the expected result; but that I can easily look up by looking at where the stack trace points. Providing the actual exit code is a lot more helpful.

Would you wait a day or two before landing, I really want to review them all (It will be a shame to lose good information if it's in there)

Sure, this isn’t urgent.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes May 30, 2017
View reviewed changes
@jasnell

jasnell commented Jun 1, 2017

Copy link
Copy Markdown
Member

ping @refack ... have you had a chance to review yet?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

halfway there.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

trevnorris
trevnorris approved these changes Jun 2, 2017
View reviewed changes

@trevnorris trevnorris left a comment

Copy link
Copy Markdown
Contributor

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.

Changes look good. Thanks for the cleanup.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AndreasMadsen AndreasMadsen mentioned this pull request Jun 2, 2017
async_hooks: use parent promise as triggerId in init hook #13367
Closed
3 of 4 tasks
@addaleax
test: improve async hooks test error messages
acbdc64
Improve error messages in the async hooks tests, mostly by removing
unhelpful `message` parameters for assertions.
@addaleax
addaleax force-pushed the async-hooks-test-message branch from e76c106 to acbdc64 Compare June 3, 2017 09:46
@addaleax

addaleax commented Jun 3, 2017

Copy link
Copy Markdown
Member Author

Rebased. @refack I think the “a day or two before landing” have passed by now, are you okay with reviewing this later and fixing up anything you’d like to see addressed yourself?

CI: https://ci.nodejs.org/job/node-test-commit/10331/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Jun 3, 2017

Copy link
Copy Markdown
Contributor

Rebased. @refack I think the “a day or two before landing” have passed by now, are you okay with reviewing this later and fixing up anything you’d like to see addressed yourself?

CI: https://ci.nodejs.org/job/node-test-commit/10331/

Yep.

addaleax reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Jun 3, 2017

Copy link
Copy Markdown
Member Author

Landed in 1dc3272

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax closed this Jun 3, 2017
@addaleax
addaleax deleted the async-hooks-test-message branch June 3, 2017 21:11
addaleax added a commit that referenced this pull request Jun 3, 2017
@addaleax
test: improve async hooks test error messages
1dc3272
Improve error messages in the async hooks tests, mostly by removing
unhelpful `message` parameters for assertions.

PR-URL: #13243
Reviewed-By: Kunal Pathak <[email protected]>
Reviewed-By: Andreas Madsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 5, 2017
@addaleax @jasnell
test: improve async hooks test error messages
8c7f9da
Improve error messages in the async hooks tests, mostly by removing
unhelpful `message` parameters for assertions.

PR-URL: #13243
Reviewed-By: Kunal Pathak <[email protected]>
Reviewed-By: Andreas Madsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
@jasnell jasnell mentioned this pull request Jun 5, 2017
8.1.0 Proposal #13483
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
@thlorenz thlorenz Awaiting requested review from thlorenz
+3 more reviewers
@trevnorris trevnorris trevnorris approved these changes
@AndreasMadsen AndreasMadsen AndreasMadsen approved these changes
@kunalspathak kunalspathak kunalspathak approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

async_hooks Issues and PRs related to the async hooks subsystem. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@addaleax @refack @jasnell @trevnorris @AndreasMadsen @cjihrig @kunalspathak @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.