-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Conversation
test-http-response-splitting
to use countdown
@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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 !
@@ -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(); |
There was a problem hiding this comment.
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.
Landed in 0f3fd79 Thanks for the PR! 🎉 ✨ |
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #17348 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Refactored test case in
test-http-response-splitting
to use countdown as per #17169Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test