@@ -288,7 +288,7 @@ public final void givenBasicHttpClientConnManager_whenConnectionReuse_thenNoExce
288288 }
289289
290290 @ Test
291- // 7 .2 ARTICLE VERSION
291+ // 6 .2 ARTICLE VERSION
292292 // @Ignore
293293 public final void whenConnectionsNeededGreaterThanMaxTotal_thenLeaseMasTotalandReuse () throws InterruptedException {
294294 final HttpGet get = new HttpGet ("http://echo.200please.com" );
@@ -308,9 +308,10 @@ public final void whenConnectionsNeededGreaterThanMaxTotal_thenLeaseMasTotalandR
308308 }
309309 }
310310
311+ // 7
312+
311313 @ Test
312- // @Ignore
313- // 7.2.1
314+ // 7.1
314315 public final void whenConfiguringTimeOut_thenNoExceptions () {
315316 route = new HttpRoute (new HttpHost ("localhost" , 80 ));
316317 poolingConnManager = new PoolingHttpClientConnectionManager ();
@@ -368,26 +369,20 @@ public final void whenCustomizedIdleConnMonitor_thenNoExceptions() throws Interr
368369 @ Test (expected = IllegalStateException .class )
369370 // @Ignore
370371 // 9.1
371- public final void whenClosingConnectionsandManager_thenCloseWithNoExceptions () throws InterruptedException , ExecutionException , IOException , HttpException {
372- route = new HttpRoute (new HttpHost ("google.com" , 80 ));
373- final HttpGet get = new HttpGet ("http://google.com" );
372+ public final void whenClosingConnectionsandManager_thenCloseWithNoExceptions1 () throws InterruptedException , ExecutionException , IOException , HttpException {
374373 poolingConnManager = new PoolingHttpClientConnectionManager ();
375- final ConnectionRequest connRequest = poolingConnManager .requestConnection (route , null );
376- context = HttpClientContext .create ();
377- conn = connRequest .get (10 , TimeUnit .SECONDS );
378- poolingConnManager .connect (conn , route , 10000 , context );
379374 client = HttpClients .custom ().setConnectionManager (poolingConnManager ).build ();
375+ final HttpGet get = new HttpGet ("http://google.com" );
380376 response = client .execute (get );
377+
381378 EntityUtils .consume (response .getEntity ());
382- client .close ();
383- conn .close ();
384379 response .close ();
380+ client .close ();
385381 poolingConnManager .close ();
386382 poolingConnManager .shutdown ();
383+
387384 client .execute (get );
388- conn .sendRequestHeader (get );
389- assertTrue (!conn .isOpen ());
390- assertTrue (conn .isOpen ());
385+
391386 assertTrue (response .getEntity () == null );
392387 }
393388
0 commit comments