1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.jndi;
18
19
20 import org.apache.ldap.server.AbstractAdminTestCase;
21 import org.apache.ldap.server.configuration.ShutdownConfiguration;
22
23
24 /***
25 * Tests the shutdown operation on the JNDI provider.
26 *
27 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
28 * @version $Rev: 264732 $
29 */
30 public class ShutdownTest extends AbstractAdminTestCase
31 {
32 protected void tearDown() throws Exception
33 {
34
35
36
37 sysRoot = null;
38 }
39
40
41 /***
42 *
43 * @throws Exception if the test fails by generating a null context
44 */
45 public void testShutdownNonNullContext() throws Exception
46 {
47 setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
48 assertNotNull( sysRoot );
49 }
50
51
52 /***
53 *
54 *
55 * @throws Exception
56 */
57 public void testShutdownRestart() throws Exception
58 {
59 setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
60 assertNotNull( sysRoot );
61
62
63 setSysRoot( "uid=admin,ou=system", "secret", configuration );
64
65
66 setSysRoot( "uid=admin,ou=system", "secret", new ShutdownConfiguration() );
67 }
68 }