mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-03-08 09:49:44 +00:00
HTTPCLIENT-1108: connection should get closed if checked back in as non-reusable.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1148901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
39a4f616aa
commit
6d517fc723
@ -464,6 +464,7 @@ public void freeEntry(BasicPoolEntry entry, boolean reusable, long validDuration
|
||||
entry.updateExpiry(validDuration, timeUnit);
|
||||
freeConnections.add(entry);
|
||||
} else {
|
||||
closeConnection(entry);
|
||||
rospl.dropEntry();
|
||||
numConnections--;
|
||||
}
|
||||
|
@ -43,7 +43,6 @@
|
||||
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 void closeExpiredConnectionsDoesNotCloseUnexpiredOnes() throws Exception
|
||||
verify(mockConnection, never()).close();
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void closesNonReusableConnections() throws Exception {
|
||||
useMockOperator();
|
||||
|
Loading…
x
Reference in New Issue
Block a user