File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
152152} ) ;
153153
154154test ( 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 ;
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ test(function serverResponseTimeoutWithPipeline(cb) {
173173} ) ;
174174
175175test ( 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
200202test ( 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 ;
You can’t perform that action at this time.
0 commit comments