Skip to content

Commit

Permalink
squash: comments per refack nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Jul 24, 2017
1 parent e3dc68f commit 340c06a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-http-set-timeout-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
});

test(function idleTimeout(cb) {
// Test that the an idle connection invokes the timeout callback.
const server = http.createServer();
const s = server.setTimeout(50, common.mustCall((socket) => {
socket.destroy();
Expand All @@ -165,6 +166,7 @@ test(function idleTimeout(cb) {
allowHalfOpen: true,
};
const c = net.connect(options, () => {
// ECONNRESET could happen on a heavily-loaded server.
c.on('error', (e) => {
if (e.message !== 'read ECONNRESET')
throw e;
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-https-set-timeout-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
});

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

test(function fastTimeout(cb) {
// Test that the socket timeout fires but no timeout fires for the request.
let connectionHandlerInvoked = false;
let timeoutHandlerInvoked = false;
let connectionSocket;
Expand Down

0 comments on commit 340c06a

Please sign in to comment.