1 17 package org.apache.ldap.server.jndi; 18 19 20 import org.apache.ldap.server.AbstractCoreTest; 21 22 23 29 public class ShutdownTest extends AbstractCoreTest 30 { 31 protected void tearDown() throws Exception 32 { 33 sysRoot = null; 37 } 38 39 40 44 public void testShutdownNonNullContext() throws Exception 45 { 46 overrides.put( EnvKeys.SHUTDOWN, "true" ); 47 48 try 49 { 50 setSysRoot( "uid=admin,ou=system", "secret" ); 51 } 52 finally 53 { 54 overrides.remove( EnvKeys.SHUTDOWN ); 55 } 56 57 assertNotNull( sysRoot ); 58 } 59 60 61 66 public void testShutdownRestart() throws Exception 67 { 68 overrides.put( EnvKeys.SHUTDOWN, "true" ); 69 70 try 71 { 72 setSysRoot( "uid=admin,ou=system", "secret" ); 73 } 74 finally 75 { 76 overrides.remove( EnvKeys.SHUTDOWN ); 77 } 78 79 assertNotNull( sysRoot ); 80 81 setSysRoot( "uid=admin,ou=system", "secret" ); 83 } 84 } 85 | Popular Tags |