diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2017-09-19 11:22:35 -0400 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2017-09-21 09:21:53 +0200 |
commit | bc23681aa2fc49df6e7cd134dfa0a782d8a471a0 (patch) | |
tree | e72eec778e84a0a6df3cbb978686aafce75ecd5b /test/parallel/test-http2-compat-serverresponse-destroy.js | |
parent | e5c290bed9775bdddd74650995f3358373af8097 (diff) | |
download | android-node-v8-bc23681aa2fc49df6e7cd134dfa0a782d8a471a0.tar.gz android-node-v8-bc23681aa2fc49df6e7cd134dfa0a782d8a471a0.tar.bz2 android-node-v8-bc23681aa2fc49df6e7cd134dfa0a782d8a471a0.zip |
http2: small fixes to compatibility layer
Expand argument validation through compat API, adjust behaviour
of response.end to not throw if stream already closed to match
http1, adjust behaviour of writeContinue to not throw if stream
already closed and other very small tweaks. Add tests for added
and fixed behaviour. Add tests for edge case behaviours of
setTimeout, createPushResponse, destroy, end and trailers.
PR-URL: https://github.com/nodejs/node/pull/15473
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-compat-serverresponse-destroy.js')
-rw-r--r-- | test/parallel/test-http2-compat-serverresponse-destroy.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js index f2b3ae7cfe..20329e0d8f 100644 --- a/test/parallel/test-http2-compat-serverresponse-destroy.js +++ b/test/parallel/test-http2-compat-serverresponse-destroy.js @@ -24,6 +24,9 @@ const server = http2.createServer(common.mustCall((req, res) => { res.on('finish', common.mustCall(() => { assert.doesNotThrow(() => res.destroy(nextError)); assert.strictEqual(res.closed, true); + process.nextTick(() => { + assert.doesNotThrow(() => res.destroy(nextError)); + }); })); if (req.url !== '/') { |