-
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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: #15052 Refs: #14985 Reviewed-By: James M Snell <[email protected]>
New test case for Expect header & checkExpectation event based on the existing http test case. PR-URL: #15040 Refs: #14985 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
http2 has now 95% statemement coverage, and I think we can consider this issue solved. |
This commit add test case where priority() throws ERR_INVALID_OPT_VALUE when stream depends on itself Refs: #14985 PR-URL: #16224 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
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: #16080 Ref: #14985 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #16094 Ref: #14985 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#16094 Ref: nodejs/node#14985 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
PR-URL: nodejs/node#15766 Ref: nodejs/node#14985 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Refs: nodejs/node#14985 PR-URL: nodejs/node#16082 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Refs: nodejs/node#14985 PR-URL: nodejs/node#16096 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #15766 Ref: #14985 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This commit tests use case when emitGoAway is called when client is shutting down but is not destroyed. Refs: #14985 PR-URL: #16215 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Refs: #14985 PR-URL: #16096 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
This commit add test case where priority() throws ERR_INVALID_OPT_VALUE when stream depends on itself Refs: #14985 PR-URL: #16224 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
PR-URL: #15624 Refs: #14985 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Refs #14985 PR-URL: #15758 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
Refs: #14985 PR-URL: #16082 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
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: