hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1148901 - in /httpcomponents/httpclient/trunk/httpclient/src: main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
Date Wed, 20 Jul 2011 19:03:28 GMT
Author: jonm
Date: Wed Jul 20 19:03:27 2011
New Revision: 1148901

URL: http://svn.apache.org/viewvc?rev=1148901&view=rev
Log:
HTTPCLIENT-1108: connection should get closed if checked back in as non-reusable.

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java?rev=1148901&r1=1148900&r2=1148901&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java
Wed Jul 20 19:03:27 2011
@@ -464,6 +464,7 @@ public class ConnPoolByRoute extends Abs
                 entry.updateExpiry(validDuration, timeUnit);
                 freeConnections.add(entry);
             } else {
+                closeConnection(entry);
                 rospl.dropEntry();
                 numConnections--;
             }

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java?rev=1148901&r1=1148900&r2=1148901&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
Wed Jul 20 19:03:27 2011
@@ -43,7 +43,6 @@ import org.apache.http.localserver.Serve
 import org.apache.http.params.BasicHttpParams;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -322,7 +321,6 @@ public class TestConnPoolByRoute extends
         verify(mockConnection, never()).close();        
     }
 
-    @Ignore
     @Test
     public void closesNonReusableConnections() throws Exception {
         useMockOperator();



Mime
View raw message