mbecke 2003/11/19 05:27:02
Modified: httpclient/src/test/org/apache/commons/httpclient
TestHttpConnectionManager.java
Log:
Changed MultiThreadedHttpConnectionManager to move to a single GC thread.
Fixes memory and thread leaks.
PR: 24309
Submitted by: Michael Becke
Reviewed by: Eric Johnson
Revision Changes Path
1.14 +6 -5
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnectionManager.java
Index: TestHttpConnectionManager.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnectionManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- TestHttpConnectionManager.java 19 Nov 2003 00:43:12 -0000 1.13
+++ TestHttpConnectionManager.java 19 Nov 2003 13:27:02 -0000 1.14
@@ -229,6 +229,8 @@
httpClient = null;
method = null;
+ System.gc();
+
// this sleep appears to be necessary in order to give the JVM
// time to clean up the miscellaneous pointers to the connection manager
try {
@@ -237,7 +239,6 @@
fail("shouldn't be interrupted.");
}
- System.gc();
Object connectionManager = wr.get();
assertNull("connectionManager should be null", connectionManager);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]