diff options
Diffstat (limited to 'test/parallel/test-http2-server-push-stream-errors.js')
-rw-r--r-- | test/parallel/test-http2-server-push-stream-errors.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/test/parallel/test-http2-server-push-stream-errors.js b/test/parallel/test-http2-server-push-stream-errors.js index 777b20eb3f..56e329dcff 100644 --- a/test/parallel/test-http2-server-push-stream-errors.js +++ b/test/parallel/test-http2-server-push-stream-errors.js @@ -6,33 +6,22 @@ if (!common.hasCrypto) const http2 = require('http2'); const { constants, - Http2Session, + Http2Stream, nghttp2ErrorString } = process.binding('http2'); // tests error handling within pushStream -// - NGHTTP2_ERR_NOMEM (should emit session error) // - NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE (should emit session error) // - NGHTTP2_ERR_STREAM_CLOSED (should emit stream error) // - every other NGHTTP2 error from binding (should emit stream error) const specificTestKeys = [ - 'NGHTTP2_ERR_NOMEM', 'NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE', 'NGHTTP2_ERR_STREAM_CLOSED' ]; const specificTests = [ { - ngError: constants.NGHTTP2_ERR_NOMEM, - error: { - code: 'ERR_OUTOFMEMORY', - type: Error, - message: 'Out of memory' - }, - type: 'session' - }, - { ngError: constants.NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE, error: { code: 'ERR_HTTP2_OUT_OF_STREAMS', @@ -40,7 +29,7 @@ const specificTests = [ message: 'No stream ID is available because ' + 'maximum stream ID has been reached' }, - type: 'session' + type: 'stream' }, { ngError: constants.NGHTTP2_ERR_STREAM_CLOSED, @@ -73,7 +62,7 @@ const tests = specificTests.concat(genericTests); let currentError; // mock submitPushPromise because we only care about testing error handling -Http2Session.prototype.submitPushPromise = () => currentError.ngError; +Http2Stream.prototype.pushPromise = () => currentError.ngError; const server = http2.createServer(); server.on('stream', common.mustCall((stream, headers) => { |