test: add http2 test for method CONNECT#15052
Closed
apapirovski wants to merge 1 commit intonodejs:masterfrom
Closed
test: add http2 test for method CONNECT#15052apapirovski wants to merge 1 commit intonodejs:masterfrom
apapirovski wants to merge 1 commit intonodejs:masterfrom
Conversation
Adds test case for default handling of method CONNECT, as well as the ability to bind a connect listener and handle the request. Refs: nodejs#14985
83685c4 to
260f29d
Compare
jasnell
reviewed
Aug 29, 2017
|
|
||
| function testMethodConnect(testsToRun) { | ||
| if (!testsToRun) { | ||
| return server.close(); |
Member
There was a problem hiding this comment.
Just pointing out... we now have a "countdown" utility that can be used to improve this kind of logic.
For instance,
const Countdown = require('../common/countdown');
const countdown = new Countdown(2, () => console.log('done!') );
countdown.dec();
countdown.dec();The callback based into Countdown will be called automatically and synchronously when the internal counter reaches zero.
Contributor
Author
There was a problem hiding this comment.
Thanks @jasnell, that's super useful. Will definitely use it in the future! Did you want me to update this test as well or good as is?
Member
There was a problem hiding this comment.
It's good as is. We can convert over to the countdown util separately
jasnell
approved these changes
Aug 29, 2017
Member
Member
|
Landed in 88441f6 |
cjihrig
pushed a commit
to cjihrig/node
that referenced
this pull request
Aug 31, 2017
Adds test case for default handling of method CONNECT, as well as the ability to bind a connect listener and handle the request. PR-URL: nodejs#15052 Refs: nodejs#14985 Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax
pushed a commit
to addaleax/ayo
that referenced
this pull request
Sep 5, 2017
Adds test case for default handling of method CONNECT, as well as the ability to bind a connect listener and handle the request. PR-URL: nodejs/node#15052 Refs: nodejs/node#14985 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds test case for default handling of method CONNECT, as well as the ability to bind a connect listener and handle the request. Part of the request for increased code coverage for http2, as per #14985
Let me know if I can change anything. Thanks!
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test