Skip to content

Commit 70ba0f9

Browse files
justin0022MylesBorins
authored andcommitted
test: increased code coverage for proxySessionHandler
PR-URL: #23583 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 18ea8cf commit 70ba0f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-http2-socket-proxy.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,17 @@ server.on('stream', common.mustCall(function(stream, headers) {
9292

9393
stream.end();
9494

95+
// Setting socket properties sets the session properties correctly.
96+
const fn = () => {};
97+
socket.setTimeout = fn;
98+
assert.strictEqual(session.setTimeout, fn);
99+
100+
socket.ref = fn;
101+
assert.strictEqual(session.ref, fn);
102+
103+
socket.unref = fn;
104+
assert.strictEqual(session.unref, fn);
105+
95106
stream.session.on('close', common.mustCall(() => {
96107
assert.strictEqual(session.socket, undefined);
97108
}));

0 commit comments

Comments
 (0)