FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: increase strictness for test-trace-event by Trott · Pull Request #11065 · nodejs/node · GitHub

/ node Public

test: increase strictness for test-trace-event - #11065

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:matchingTraces
Closed

test: increase strictness for test-trace-event#11065
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:matchingTraces

Conversation

Trott commented Jan 29, 2017

Copy link
Copy Markdown
Member

Change test-trace-event such that it checks that all expected values are
within the same trace object rather than scattered across multiple trace
objects.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Trott added the test Issues and PRs related to the tests. label Jan 29, 2017
mscdex added the trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events. label Jan 29, 2017
Trott changed the title test: increase strictenss for test-trace-event test: increase strictness for test-trace-event Jan 29, 2017
Change test-trace-event such that it checks that all expected values are
within the same trace object rather than scattered across multiple trace
objects.

evanlucas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

if (trace.cat !== 'v8')
return false;
if (trace.name !== 'V8.ScriptCompiler')
return false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would prefer to condense these but definitely not necessary to do so:

e.g.

return trace.pid === proc.pid &&
           trace.cat === 'v8' &&
           trace.name === 'V8.ScriptCompiler';

Trott Jan 31, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think changing each to an assert.strictEqual() would be even better because it gives descriptive information about exactly why the throw isn't matching. Otherwise, you kind of have to figure it out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

D'oh! No, I'm wrong, never mind. I thought this was inside an assert.throws() and not an Array.prototype.some(). Ignore my previous comment.

jasnell commented Jan 31, 2017

Copy link
Copy Markdown
Member

Trott commented Feb 1, 2017

Copy link
Copy Markdown
Member Author

FreeBSD failure due to a stuck process and unrelated.

FreeBSD CI again: https://ci.nodejs.org/job/node-test-commit-freebsd/6796/

Trott commented Feb 2, 2017

Copy link
Copy Markdown
Member Author

FreeBSD CI again again: https://ci.nodejs.org/job/node-test-commit-freebsd/6816/

Trott added a commit to Trott/io.js that referenced this pull request Feb 2, 2017
Change test-trace-event such that it checks that all expected values are
within the same trace object rather than scattered across multiple trace
objects.

PR-URL: nodejs#11065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Trott commented Feb 2, 2017

Copy link
Copy Markdown
Member Author

Landed in 773cdc3

Trott closed this Feb 2, 2017

Copy link
Copy Markdown

After #11106 land we can include this on v7.x-staging

targos pushed a commit to targos/node that referenced this pull request Mar 1, 2017
Change test-trace-event such that it checks that all expected values are
within the same trace object rather than scattered across multiple trace
objects.

PR-URL: nodejs#11065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 1, 2017
Change test-trace-event such that it checks that all expected values are
within the same trace object rather than scattered across multiple trace
objects.

PR-URL: nodejs#11065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas mentioned this pull request Mar 1, 2017

Trott commented Mar 3, 2017

Copy link
Copy Markdown
Member Author

This is dependent on #9304 which is semver-minor so (if I'm understanding correctly) should not land on the LTS branches. Adding dont-land-on labels. /cc @MylesBorins to confirm that I am Doing This Right™.

Trott deleted the matchingTraces branch January 13, 2022 22:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

9 participants


Back | FazBrowse Home | New Git URL