-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
http2: improve code coverage #14985
Comments
There's https://github.com/http2/http2-test, which happens to be written to run on Node.js. We should look into |
@TimothyGu thats fairly old and for the http2 module published on npm. I think we need something specific for core in |
@mcollina I'd like to help improve the test coverage. Where should I look to get started on http2? |
@benhalverson ... reach out any time with any questions you may have. |
@jasnell should it be one PR per test file added or multiple test files in one PR (if it matters)? |
@ssbrewster it's ok if it's a PR with 2-3 files if they are connected to the same area that you are testing. If you are adding some tests for |
Great, thanks for the clarification @mcollina |
Expanded an existing test for setting pseudo-headers on response to include all pseudo-headers, not just :status. Refs: nodejs#14985
New test case for Expect header & checkExpectation event based on the existing http test case. Refs: nodejs#14985
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
Expanded an existing test for setting pseudo-headers on response to include all pseudo-headers, not just :status. PR-URL: #15035 Refs: #14985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Correct requestOnConnect to emit session error on NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE rather than stream error. Add full test suite for the error handling within requestOnConnect. Refs: nodejs#14985
Expanded an existing test for setting pseudo-headers on response to include all pseudo-headers, not just :status. PR-URL: nodejs/node#15035 Refs: nodejs/node#14985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Expanded an existing test for setting pseudo-headers on response to include all pseudo-headers, not just :status. PR-URL: nodejs/node#15035 Refs: nodejs/node#14985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
http2 has now 95% statemement coverage, and I think we can consider this issue solved. |
This adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader Refs: nodejs#14985
This code change modifies connectionListener tests to cover test case where this.emit('unknownProtocol', socket) returns false PR-URL: nodejs/node#16080 Ref: nodejs/node#14985 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#16094 Ref: nodejs/node#14985 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: nodejs/node#15766 Ref: nodejs/node#14985 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Refs: nodejs/node#14985 PR-URL: nodejs/node#16082 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit tests use case when emitGoAway is called when client is shutting down but is not destroyed. Refs: nodejs/node#14985 PR-URL: nodejs/node#16215 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Refs: nodejs/node#14985 PR-URL: nodejs/node#16096 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit add test case where priority() throws ERR_INVALID_OPT_VALUE when stream depends on itself Refs: nodejs/node#14985 PR-URL: nodejs/node#16224 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs#16246 Refs: nodejs#14985 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: #16246 Refs: #14985 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Refs: #14985 PR-URL: #16082 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs/node#16246 Refs: nodejs/node#14985 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This simplifies validation of te header and adds a test case in which array with two values is passed to param value in isIllegalConnectionSpecificHeader PR-URL: nodejs/node#16246 Refs: nodejs/node#14985 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This is a meta-issue to improve the code coverage of http2.
As you can see in https://coverage.nodejs.org/coverage-342c5f9d4c2eb868/root/internal/http2/index.html, we have 79% code coverage, and we should definitely do better before it leaves experimental status.
Feel free to reach out to @nodejs/http2 if you have any questions on how to test this part of Node.js.
The text was updated successfully, but these errors were encountered: