Skip to content

Commit 4b873ee

Browse files
justin0022jasnell
authored andcommitted
test: increased code coverage for proxySessionHandler
PR-URL: #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>
1 parent 62c6e44 commit 4b873ee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

+11
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)