@@ -253,40 +253,6 @@ describe('#createProxyServer.web() using own http server', function () {
253
253
} , function ( ) { } ) . end ( ) ;
254
254
} ) ;
255
255
256
- it ( 'should proxy the request and handle timeout error (proxyTimeout)' , function ( done ) {
257
- var proxy = httpProxy . createProxyServer ( {
258
- target : 'http://127.0.0.1:45000' ,
259
- proxyTimeout : 100
260
- } ) ;
261
-
262
- require ( 'net' ) . createServer ( ) . listen ( 45000 ) ;
263
-
264
- var proxyServer = http . createServer ( requestHandler ) ;
265
-
266
- var started = new Date ( ) . getTime ( ) ;
267
- function requestHandler ( req , res ) {
268
- proxy . once ( 'error' , function ( err , errReq , errRes ) {
269
- proxyServer . close ( ) ;
270
- expect ( err ) . to . be . an ( Error ) ;
271
- expect ( errReq ) . to . be . equal ( req ) ;
272
- expect ( errRes ) . to . be . equal ( res ) ;
273
- expect ( new Date ( ) . getTime ( ) - started ) . to . be . greaterThan ( 99 ) ;
274
- expect ( err . code ) . to . be ( 'ECONNRESET' ) ;
275
- done ( ) ;
276
- } ) ;
277
-
278
- proxy . web ( req , res ) ;
279
- }
280
-
281
- proxyServer . listen ( '8084' ) ;
282
-
283
- http . request ( {
284
- hostname : '127.0.0.1' ,
285
- port : '8084' ,
286
- method : 'GET' ,
287
- } , function ( ) { } ) . end ( ) ;
288
- } ) ;
289
-
<
489D
tr class="diff-line-row">290
256
it ( 'should proxy the request and handle timeout error' , function ( done ) {
291
257
var proxy = httpProxy . createProxyServer ( {
292
258
target : 'http://127.0.0.1:45001' ,
0 commit comments