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: remove common.hasTracing #22250

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Aug 10, 2018

common.hasTracing is only used in one place. common is bloated so
let's move that to the one test that uses it.

hasTracing is undocumented to there's no need to remove it from the
README file as it's not there in the first place.

Similarly, it's not included in the .mjs version of the common file.

@nodejs/testing

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 10, 2018
@Trott
Copy link
Member Author

Trott commented Aug 10, 2018

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 10, 2018
@@ -3,7 +3,7 @@

const common = require('../common');

if (!common.hasTracing)
if (!process.binding('config').hasTracing)
Copy link
Member

@jasnell jasnell Aug 10, 2018

Choose a reason for hiding this comment

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

This could likely be modified to simply attempt to require('trace_events'), which will throw if tracing is not enabled...

let trace_events;
try {
  trace_events = require('trace_events');
} catch (err) {
  common.skip('missing trace events');
}
// ...

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't oppose such a modification, but if given the choice, I'd prefer to keep this a simple migrate-the-existing-thing-into-the-one-test-that-uses-it and have any modifications to the-existing-thing happen in a subsequent PR.

@Trott
Copy link
Member Author

Trott commented Aug 10, 2018

`common.hasTracing` is only used in one place. `common` is bloated so
let's move that to the one test that uses it.

`hasTracing` is undocumented so there's no need to remove it from the
README file as it's not there in the first place.

Similarly, it's not included in the .mjs version of the `common` file.
Trott added a commit to Trott/io.js that referenced this pull request Aug 14, 2018
`common.hasTracing` is only used in one place. `common` is bloated so
let's move that to the one test that uses it.

`hasTracing` is undocumented so there's no need to remove it from the
README file as it's not there in the first place.

Similarly, it's not included in the .mjs version of the `common` file.

PR-URL: nodejs#22250
Reviewed-By: Bryan English <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: George Adams <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@Trott
Copy link
Member Author

Trott commented Aug 14, 2018

Landed in c75c917

@Trott Trott closed this Aug 14, 2018
targos pushed a commit that referenced this pull request Aug 19, 2018
`common.hasTracing` is only used in one place. `common` is bloated so
let's move that to the one test that uses it.

`hasTracing` is undocumented so there's no need to remove it from the
README file as it's not there in the first place.

Similarly, it's not included in the .mjs version of the `common` file.

PR-URL: #22250
Reviewed-By: Bryan English <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: George Adams <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Sep 3, 2018
`common.hasTracing` is only used in one place. `common` is bloated so
let's move that to the one test that uses it.

`hasTracing` is undocumented so there's no need to remove it from the
README file as it's not there in the first place.

Similarly, it's not included in the .mjs version of the `common` file.

PR-URL: #22250
Reviewed-By: Bryan English <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: George Adams <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@Trott Trott deleted the remove-hasTracing branch January 13, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants