Skip to content
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: better error message in trace events test #20655

Closed

Conversation

addaleax
Copy link
Member

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 10, 2018
@addaleax addaleax added async_hooks Issues and PRs related to the async hooks subsystem. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events. fast-track PRs that do not need to wait for 48 hours to land. labels May 10, 2018
@addaleax
Copy link
Member Author

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

Please 👍 for fast-tracking.

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but it might make sense to add a sentence that every id should be above 0, no?

@addaleax
Copy link
Member Author

@BridgeAR I think anybody who’s looking into a failure of this assertion would look at the test code anyway. But if you have some concrete suggestion, feel free to push directly to this PR. :)

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Super-micro-nit that you should totally ignore if you don't agree with it: Semantically, I prefer assert.ok() in tests (and assert() for stuff in production/lib code). So maybe take this opportunity to fix up line 62?

@addaleax addaleax removed the fast-track PRs that do not need to wait for 48 hours to land. label May 13, 2018
@addaleax addaleax force-pushed the improve-async-hooks-trace-events-test branch from 54e3089 to 051ea50 Compare May 13, 2018 15:24
@addaleax
Copy link
Member Author

@Trott Very much fine with that, done! :)

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

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 13, 2018
@BridgeAR
Copy link
Member

@Trott would you be so kind and open a small poll to see how people would prefer this in general? If there is a specific preference we could just add a lint rule for it. Right now this is very mixed and it will stay that way as there are likely different preferences (if people have a preference or opinion at all).

@addaleax
Copy link
Member Author

Landed in f8fc2f8

@addaleax addaleax closed this May 14, 2018
@addaleax addaleax deleted the improve-async-hooks-trace-events-test branch May 14, 2018 16:14
dnalborczyk pushed a commit to dnalborczyk/node that referenced this pull request May 14, 2018
PR-URL: nodejs#20655
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
addaleax added a commit that referenced this pull request May 14, 2018
PR-URL: #20655
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@addaleax addaleax mentioned this pull request May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async_hooks Issues and PRs related to the async hooks subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants