Issue #434 RequestTest stack traces

Added reset to ShutdownMonitor
This commit is contained in:
Greg Wilkins 2016-03-17 10:33:58 +11:00
parent 18aeca6567
commit df9de50f96
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,11 @@ public class ShutdownMonitor
return Holder.instance;
}
protected static void reset()
{
Holder.instance = new ShutdownMonitor();
}
public static void register(LifeCycle... lifeCycles)
{
getInstance().addLifeCycles(lifeCycles);

View File

@ -26,6 +26,7 @@ import java.net.InetAddress;
import java.net.Socket;
import org.eclipse.jetty.util.thread.ShutdownThread;
import org.junit.AfterClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@ -33,6 +34,12 @@ import static org.junit.Assert.assertTrue;
public class ShutdownMonitorTest
{
@AfterClass
public static void afterClass()
{
ShutdownMonitor.reset();
}
@Test
public void testShutdownMonitor() throws Exception
{