Skip to content

test: http2 stream.respond() error checks - #18861

Closed
trivikr wants to merge 1 commit into
nodejs:masterfrom
trivikr:test-http2-respond-errors
Closed

test: http2 stream.respond() error checks#18861
trivikr wants to merge 1 commit into
nodejs:masterfrom
trivikr:test-http2-respond-errors

Conversation

@trivikr

Copy link
Copy Markdown
Member

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

if(this.destroyed||this.closed)
thrownewerrors.Error('ERR_HTTP2_INVALID_STREAM');
if(this.headersSent)
thrownewerrors.Error('ERR_HTTP2_HEADERS_SENT');

if(typeofoptions.getTrailers!=='function'){
thrownewerrors.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-botnodejs-github-bot added the test Issues and PRs related to the tests. label Feb 19, 2018
@trivikr
trivikrforce-pushed the test-http2-respond-errors branch 2 times, most recently from 5cbb365 to 8b612b1CompareFebruary 19, 2018 04:36
@hiroppyhiroppy added the http2 Issues or PRs related to the http2 subsystem. label Feb 19, 2018
@trivikr
trivikrforce-pushed the test-http2-respond-errors branch from 8b612b1 to 37ec0ceCompareFebruary 19, 2018 05:22
@jasnell

Copy link
Copy Markdown
Member

@BridgeARBridgeAR 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
PR-URL: nodejs#18861
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR

Copy link
Copy Markdown
Member

Landed in 5782c51 🎉

@MylesBorins

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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

@targostargos 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
PR-URL: nodejs#18861
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Mar 30, 2018
Backport-PR-URL: #19579
PR-URL: #18861
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos 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 <jasnell@gmail.com>
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 <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request May 2, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
PR-URL: nodejs#18861
Reviewed-By: James M Snell <jasnell@gmail.com>
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 <jasnell@gmail.com>
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 <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http2Issues or PRs related to the http2 subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@trivikr@jasnell@BridgeAR@MylesBorins@targos@hiroppy@nodejs-github-bot