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 : refactor parallel/test-tls-cert-chains-concat #19096

Conversation

juggernaut451
Copy link
Contributor

added common.mustCall and replaced the function with arrow function

Fixes : #14544

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

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Mar 2, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Mar 2, 2018

@juggernaut451 thanks a lot for your contribution. I personally feel like it is not really the right direction though to always add common.mustCall. @nodejs/collaborators do we actually want to add must calls everywhere?

This is more of a general thing and has nothing to do with this specific PR.

@richardlau
Copy link
Member

do we actually want to add must calls everywhere?

IMO we do for callbacks otherwise the tests could pass if the callback was never called.

@BridgeAR
Copy link
Member

BridgeAR commented Mar 2, 2018

@richardlau I do not agree on that point if the callback is from a heavily used main API. If it is a callback that is unique to the test itself it should be added.

@richardlau
Copy link
Member

richardlau commented Mar 2, 2018

@BridgeAR I'd argue that it's a much simpler rule to apply everywhere rather than have to try to decide if an API is heavily used enough. If you do feel strongly about this I suggest raising a separate issue for discussion so that we don't clog up this PR 😄.

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

LGTM

@BridgeAR I see your concerns, but I don’t really see a downside of having these checks here… I guess it’s a bit of churn, but I’d say we’ve done worse things in the past when it comes to that

@Trott
Copy link
Member

Trott commented Mar 2, 2018

No comment on this particular change, but in general: I'd prefer we be judicious in our use of common.mustCall(). Obviously, if the test may pass erroneously if the callback does not run, then we should use it. Otherwise, we should only use it (IMO) if it clearly improves the error message when the test fails. We should be thoughtful about it.

@jasnell
Copy link
Member

jasnell commented Mar 6, 2018

added common.mustCall and replaced function with arrow function

Fixes : nodejs#14544
@juggernaut451 juggernaut451 force-pushed the refactorTestTlsCertChainsConcat branch from a4c34f5 to 8a11196 Compare March 7, 2018 20:10
@juggernaut451
Copy link
Contributor Author

Resolved :)

@BridgeAR
Copy link
Member

BridgeAR commented Apr 9, 2018

Landed in cbc7eb7 🎉

@BridgeAR BridgeAR closed this Apr 9, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Apr 9, 2018
Added common.mustCall and replaced function with arrow function.

PR-URL: nodejs#19096
Fixes: nodejs#14544
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
targos pushed a commit that referenced this pull request Apr 12, 2018
Added common.mustCall and replaced function with arrow function.

PR-URL: #19096
Fixes: #14544
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants