Disable StopThreadsCleanUp

When this is enabled, we get timeouts on some machines (seems to depend
on the number of cores) when the server is stopped which leads to an
error when the integration tests are run (the server cannot be stopped
fast enough when the integration tests are finished in webapp and shall
be started for scm-it).
This commit is contained in:
Rene Pfeuffer
2019-12-02 08:49:31 +01:00
parent 9c4d49b39f
commit fc8677617b

View File

@@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor; import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor;
import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorFactory; import se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorFactory;
import se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp; import se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp;
import se.jiderhamn.classloader.leak.prevention.cleanup.StopThreadsCleanUp;
import se.jiderhamn.classloader.leak.prevention.preinit.SunAwtAppContextInitiator; import se.jiderhamn.classloader.leak.prevention.preinit.SunAwtAppContextInitiator;
import sonia.scm.lifecycle.LifeCycle; import sonia.scm.lifecycle.LifeCycle;
import sonia.scm.plugin.ChildFirstPluginClassLoader; import sonia.scm.plugin.ChildFirstPluginClassLoader;
@@ -43,6 +44,9 @@ public final class ClassLoaderLifeCycle implements LifeCycle {
classLoaderLeakPreventorFactory.removePreInitiator(SunAwtAppContextInitiator.class); classLoaderLeakPreventorFactory.removePreInitiator(SunAwtAppContextInitiator.class);
// the MBeanCleanUp causes a Exception and we use no mbeans // the MBeanCleanUp causes a Exception and we use no mbeans
classLoaderLeakPreventorFactory.removeCleanUp(MBeanCleanUp.class); classLoaderLeakPreventorFactory.removeCleanUp(MBeanCleanUp.class);
// the StopThreadsCleanUp leads to timeouts on shutdown - we try to stop our threads on our own
classLoaderLeakPreventorFactory.removeCleanUp(StopThreadsCleanUp.class);
return new ClassLoaderLifeCycle(Thread.currentThread().getContextClassLoader(), classLoaderLeakPreventorFactory); return new ClassLoaderLifeCycle(Thread.currentThread().getContextClassLoader(), classLoaderLeakPreventorFactory);
} }