Ejemplo n.º 1
0
 /**
  * Tests the behavior of the manager as it starts up.
  *
  * @throws Exception
  */
 public void testStartIcpServer() throws Exception {
   assertFalse(testableIcpManager.isIcpServerRunning());
   assertNegative(testableIcpManager.getCurrentPort());
   setConfigCalled = false;
   int port = getNewPort();
   setEnabled(true, port);
   assertTrue(setConfigCalled);
   assertTrue(testableIcpManager.isIcpServerRunning());
   assertEquals(port, testableIcpManager.getCurrentPort());
 }
Ejemplo n.º 2
0
 /* Inherit documentation */
 public void setUp() throws Exception {
   super.setUp();
   ConfigurationUtil.addFromArgs(
       "org.lockss.log.IcpManager.level",
       "debug3",
       "org.lockss.log.IcpSocketImpl.level",
       "debug3");
   setEnabled(false, BAD_PORT);
   setConfigCalled = false;
   mockLockssDaemon = getMockLockssDaemon();
   testableIcpManager = new TestableIcpManager();
   mockLockssDaemon.setIcpManager(testableIcpManager);
   testableIcpManager.initService(mockLockssDaemon);
   mockLockssDaemon.setDaemonInited(true);
   testableIcpManager.startService();
 }
Ejemplo n.º 3
0
 /* Inherit documentation */
 public void tearDown() {
   testableIcpManager.stopService();
 }