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 : refactored test-http-response-splitting to use countdown #17348

Closed
wants to merge 1 commit into from
Closed

test : refactored test-http-response-splitting to use countdown #17348

wants to merge 1 commit into from

Conversation

mithunsasidharan
Copy link
Contributor

Refactored test case in test-http-response-splitting to use countdown as per #17169

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • 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 Nov 27, 2017
@mithunsasidharan mithunsasidharan changed the title test : Refactored test-http-response-splitting to use countdown test : refactored test-http-response-splitting to use countdown Nov 27, 2017
@mscdex mscdex added the http Issues or PRs related to the http subsystem. label Nov 27, 2017
@mithunsasidharan
Copy link
Contributor Author

@maclover7 : Kindly run the CI for this PR too. Thanks !

@@ -46,8 +48,7 @@ const server = http.createServer((req, res) => {
default:
assert.fail('should not get to here.');
}
if (count === 3)
server.close();
countdown.dec();
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the count variable itself, if we can return the current value from Countdown.dec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thefourtheye : For what you've suggested.. the dec() returns the remaining count and not current count right... return this[kLimit]
So I guess we would need the count variable being used in switch else I'll have to do limit - countdown.remaining() or something to get the current count..Correct me if I'm wrong... we're counting down right...!

Copy link
Contributor

Choose a reason for hiding this comment

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

That's okay. That can be done in a separate PR though. I think that would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thefourtheye : I'll have it done over another PR !

@thefourtheye
Copy link
Contributor

@@ -46,8 +48,7 @@ const server = http.createServer((req, res) => {
default:
assert.fail('should not get to here.');
}
if (count === 3)
server.close();
countdown.dec();
Copy link
Contributor

Choose a reason for hiding this comment

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

That's okay. That can be done in a separate PR though. I think that would be helpful.

@maclover7
Copy link
Contributor

@maclover7 maclover7 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 1, 2017
@addaleax
Copy link
Member

addaleax commented Dec 1, 2017

Landed in 0f3fd79

Thanks for the PR! 🎉 ✨

@addaleax addaleax closed this Dec 1, 2017
@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 1, 2017
addaleax pushed a commit that referenced this pull request Dec 1, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
@MylesBorins MylesBorins mentioned this pull request Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants