Skip to content

Conversation

@trivikr
Copy link
Member

This code change adds tests for the following errors in ping(payload, callback)

if(payload&&!isArrayBufferView(payload)){
thrownewerrors.TypeError('ERR_INVALID_ARG_TYPE',
'payload',
['Buffer','TypedArray','DataView']);
}
if(payload&&payload.length!==8){
thrownewerrors.RangeError('ERR_HTTP2_PING_LENGTH');
}
if(typeofcallback!=='function')
thrownewerrors.TypeError('ERR_INVALID_CALLBACK');

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 18, 2018
message: 'HTTP2 ping cancelled'
})));

// should throw if payload is not of type ArrayBufferView
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please always use a capital letter as first letter in a comment and punctuate the comments as well.

@BridgeAR
Copy link
Member

BridgeAR commented Feb 18, 2018

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 18, 2018
jasnell pushed a commit that referenced this pull request Feb 20, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@jasnell
Copy link
Member

Landed 1e57a8d

@jasnelljasnell closed this Feb 20, 2018
@trivikrtrivikr deleted the test-http2-ping branch February 20, 2018 15:59
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Feb 21, 2018
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
PR-URL: nodejs#18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins

This comment has been minimized.

MylesBorins pushed a commit that referenced this pull request Aug 7, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 7, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 9, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Aug 16, 2018
MylesBorins pushed a commit that referenced this pull request Aug 16, 2018
PR-URL: #18849 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@trivikr@BridgeAR@jasnell@MylesBorins@lpinca@cjihrig@nodejs-github-bot