mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
HTTPCLIENT-692: updated test cases
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@578387 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a9722d704e
commit
8f3f51e39d
@ -157,7 +157,7 @@ public void testConstructor() {
|
|||||||
} // testConstructor
|
} // testConstructor
|
||||||
|
|
||||||
|
|
||||||
public void testGetConnection() {
|
public void testGetConnection() throws InterruptedException {
|
||||||
ThreadSafeClientConnManager mgr = createTSCCM(null, null);
|
ThreadSafeClientConnManager mgr = createTSCCM(null, null);
|
||||||
|
|
||||||
HttpHost target = new HttpHost("www.test.invalid", 80, "http");
|
HttpHost target = new HttpHost("www.test.invalid", 80, "http");
|
||||||
@ -184,7 +184,7 @@ public void testGetConnection() {
|
|||||||
// several other tests here rely on timeout behavior
|
// several other tests here rely on timeout behavior
|
||||||
|
|
||||||
|
|
||||||
public void testMaxConnTotal() {
|
public void testMaxConnTotal() throws InterruptedException {
|
||||||
|
|
||||||
HttpParams params = createDefaultParams();
|
HttpParams params = createDefaultParams();
|
||||||
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(params, 1);
|
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(params, 1);
|
||||||
@ -365,7 +365,7 @@ public void testReleaseConnection() throws Exception {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testDeleteClosedConnections() {
|
public void testDeleteClosedConnections() throws InterruptedException {
|
||||||
|
|
||||||
ThreadSafeClientConnManager mgr = createTSCCM(null, null);
|
ThreadSafeClientConnManager mgr = createTSCCM(null, null);
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ public void testInterruptThread() throws Exception {
|
|||||||
assertNotNull("thread should have gotten an exception",
|
assertNotNull("thread should have gotten an exception",
|
||||||
gct.getException());
|
gct.getException());
|
||||||
assertSame("thread got wrong exception",
|
assertSame("thread got wrong exception",
|
||||||
IllegalThreadStateException.class,
|
InterruptedException.class,
|
||||||
gct.getException().getClass());
|
gct.getException().getClass());
|
||||||
|
|
||||||
// make sure the manager is still working
|
// make sure the manager is still working
|
||||||
@ -530,7 +530,5 @@ public void testReusePreference() throws Exception {
|
|||||||
mgr.shutdown();
|
mgr.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3.x TestHttpConnectionManager.testShutdownAll is not ported
|
|
||||||
// the shutdownAll() method is scheduled for removal
|
|
||||||
|
|
||||||
} // class TestTSCCMNoServer
|
} // class TestTSCCMNoServer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user