Skip to content

Commit

Permalink
test: increased code coverage for proxySessionHandler
Browse files Browse the repository at this point in the history
PR-URL: nodejs#23583
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
justin0022 authored and BridgeAR committed Oct 15, 2018
1 parent f87e966 commit 93c918e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-http2-socket-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ server.on('stream', common.mustCall(function(stream, headers) {

stream.end();

// Setting socket properties sets the session properties correctly.
const fn = () => {};
socket.setTimeout = fn;
assert.strictEqual(session.setTimeout, fn);

socket.ref = fn;
assert.strictEqual(session.ref, fn);

socket.unref = fn;
assert.strictEqual(session.unref, fn);

stream.session.on('close', common.mustCall(() => {
assert.strictEqual(session.socket, undefined);
}));
Expand Down

0 comments on commit 93c918e

Please sign in to comment.