Skip to content

Commit 340c06a

Browse files
committed
squash: comments per refack nits
1 parent e3dc68f commit 340c06a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

test/parallel/test-http-set-timeout-server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
152152
});
153153

154154
test(function idleTimeout(cb) {
155+
// Test that the an idle connection invokes the timeout callback.
155156
const server = http.createServer();
156157
const s = server.setTimeout(50, common.mustCall((socket) => {
157158
socket.destroy();
@@ -165,6 +166,7 @@ test(function idleTimeout(cb) {
165166
allowHalfOpen: true,
166167
};
167168
const c = net.connect(options, () => {
169+
// ECONNRESET could happen on a heavily-loaded server.
168170
c.on('error', (e) => {
169171
if (e.message !== 'read ECONNRESET')
170172
throw e;

test/parallel/test-https-set-timeout-server.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
173173
});
174174

175175
test(function idleTimeout(cb) {
176+
// Test that the an idle connection invokes the timeout callback.
176177
const server = https.createServer(serverOptions);
177178
const s = server.setTimeout(50, common.mustCall((socket) => {
178179
socket.destroy();
@@ -187,6 +188,7 @@ test(function idleTimeout(cb) {
187188
rejectUnauthorized: false
188189
};
189190
const c = tls.connect(options, () => {
191+
// ECONNRESET could happen on a heavily-loaded server.
190192
c.on('error', (e) => {
191193
if (e.message !== 'read ECONNRESET')
192194
throw e;
@@ -198,6 +200,7 @@ test(function idleTimeout(cb) {
198200
});
199201

200202
test(function fastTimeout(cb) {
203+
// Test that the socket timeout fires but no timeout fires for the request.
201204
let connectionHandlerInvoked = false;
202205
let timeoutHandlerInvoked = false;
203206
let connectionSocket;

0 commit comments

Comments
 (0)