parent
18aeca6567
commit
df9de50f96
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue