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: use countdown in test file #17874

Closed
wants to merge 1 commit into from

Conversation

sreepurnajasti
Copy link
Contributor

@sreepurnajasti sreepurnajasti commented Dec 27, 2017

Fixes: #17169

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 27, 2017
let requests = 0;
let responses = 0;
const requestCountdown = new Countdown(total, () => server.close());
const responsecountdown = new Countdown(total, () => checkFiles());
Copy link
Contributor

Choose a reason for hiding this comment

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

It is better to add a mustCall for these two lines. For example:

new Countdown(total, common.mustCall(() => server.close()));

Copy link
Contributor Author

@sreepurnajasti sreepurnajasti Dec 27, 2017

Choose a reason for hiding this comment

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

@starkwang Thanks. Its done!!!

@tniessen
Copy link
Member

If this commit is landed as it is, it will close the referenced issue (which I don't think is correct).

const requestCountdown = new Countdown(total, common.mustCall(() =>
server.close()
));
const responsecountdown = new Countdown(total, common.mustCall(() =>
Copy link
Member

Choose a reason for hiding this comment

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

Could you update this const to be camelCase please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@apapirovski Done. Thanks!!

let requests = 0;
let responses = 0;
const requestCountdown = new Countdown(total, common.mustCall(() =>
server.close()
Copy link
Member

Choose a reason for hiding this comment

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

I could be wrong but I don't think we strictly need two separate countdowns in this test? We could just use the responseCountdown and have the server.close() be inside it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@apapirovski It works fine. Done.

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

LGTM with @apapirovski's comments addressed.

@lpinca
Copy link
Member

lpinca commented Dec 28, 2017

@starkwang starkwang added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 29, 2017
starkwang pushed a commit that referenced this pull request Dec 30, 2017
Fixes: #17169

PR-URL: #17874
Fixes: #17169
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@starkwang
Copy link
Contributor

Landed in 166a2ce. Thanks for your contribution! 🥇

@sreepurnajasti sreepurnajasti deleted the pipeline branch December 30, 2017 11:55
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
Fixes: #17169

PR-URL: #17874
Fixes: #17169
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
Fixes: #17169

PR-URL: #17874
Fixes: #17169
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
Fixes: #17169

PR-URL: #17874
Fixes: #17169
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 10, 2018
@TimothyGu TimothyGu removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 13, 2018
gibfahn pushed a commit that referenced this pull request Jan 24, 2018
Fixes: #17169

PR-URL: #17874
Fixes: #17169
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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.

[Tracking issue] Converting tests to use Countdown