mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
encourage early GC
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17832 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
f8644cf5a8
commit
88895e7eef
1 file changed
+6
@@ -226,6 +226,12 @@ public abstract class HudsonTestCase extends TestCase {
|
||||
env.dispose();
|
||||
ExtensionList.clearLegacyInstances();
|
||||
DescriptorExtensionList.clearLegacyInstances();
|
||||
|
||||
// Hudson creates ClassLoaders for plugins that hold on to file descriptors of its jar files,
|
||||
// but because there's no explicit dispose method on ClassLoader, they won't get GC-ed until
|
||||
// at some later point, leading to possible file descriptor overflow. So encourage GC now.
|
||||
// see http://bugs.sun.com/view_bug.do?bug_id=4950148
|
||||
System.gc();
|
||||
}
|
||||
|
||||
protected void runTest() throws Throwable {
|
||||
|
||||
Reference in new issue
Block a user