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: http2 stream.respond() error checks #18861

Closed
wants to merge 1 commit into from

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Feb 19, 2018

This code change adds tests for the following errors in respond(headers, options):

if (this.destroyed || this.closed)
throw new errors.Error('ERR_HTTP2_INVALID_STREAM');
if (this.headersSent)
throw new errors.Error('ERR_HTTP2_HEADERS_SENT');

if (typeof options.getTrailers !== 'function') {
throw new errors.TypeError('ERR_INVALID_OPT_VALUE',
'getTrailers',
options.getTrailers);
}

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)

http2

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 19, 2018
@trivikr trivikr force-pushed the test-http2-respond-errors branch 2 times, most recently from 5cbb365 to 8b612b1 Compare February 19, 2018 04:36
@hiroppy hiroppy added the http2 Issues or PRs related to the http2 subsystem. label Feb 19, 2018
@jasnell
Copy link
Member

jasnell commented Feb 20, 2018

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 21, 2018
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 22, 2018
@BridgeAR
Copy link
Member

Landed in 5782c51 🎉

@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@trivikr trivikr deleted the test-http2-respond-errors branch March 8, 2018 14:45
@trivikr
Copy link
Member Author

trivikr commented Mar 8, 2018

@MylesBorins These are just unit tests, backport to v9.x-staging is not required

@targos targos added dont-land-on-v9.x and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-requested-v9.x labels Mar 24, 2018
targos pushed a commit to targos/node that referenced this pull request Mar 24, 2018
targos pushed a commit that referenced this pull request Mar 30, 2018
Backport-PR-URL: #19579
PR-URL: #18861
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Apr 4, 2018
kjin pushed a commit to kjin/node that referenced this pull request May 1, 2018
Backport-PR-URL: nodejs#19579
PR-URL: nodejs#18861
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 2, 2018
Backport-PR-URL: #19579
Backport-PR-URL: #20456
PR-URL: #18861
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 2, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
MylesBorins pushed a commit that referenced this pull request May 15, 2018
Backport-PR-URL: #19579
Backport-PR-URL: #20456
PR-URL: #18861
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 15, 2018
Backport-PR-URL: #19579
Backport-PR-URL: #20456
PR-URL: #18861
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants