提交 88895e7e 编写于 作者: K kohsuke

encourage early GC

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17832 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f8644cf5
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册