#427 - ENH: Add support for Removing ShutdownManager.shutdownHook ... manually control entire shutdown.

This commit is contained in:
Robin Bygrave
2015-10-01 10:33:09 +13:00
parent 19459b71b4
commit bfa86f241b
2 changed files with 41 additions and 2 deletions
@@ -0,0 +1,32 @@
package com.avaje.ebeaninternal.server.lib;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import org.junit.Ignore;
import org.junit.Test;
public class ShutdownManagerTest extends BaseTestCase {
/**
* Run this test manually.
*/
@Ignore
@Test
public void test_deregisterShutdownHook() {
Ebean.getDefaultServer();
ShutdownManager.deregisterShutdownHook();
}
/**
* Run this test manually.
*/
@Ignore
@Test
public void test_noShutdownHook() {
System.setProperty("ebean.registerShutdownHook","false");
Ebean.getDefaultServer();
}
}