Exemplo n.º 1
0
  public void testOutagesClosedOnDelete(MockElement element) {

    startDaemons();

    Event deleteEvent = element.createDeleteEvent();

    // bring down so we create an outage in the outages table
    anticipateDown(element);
    element.bringDown();
    verifyAnticipated(5000, false);

    m_outageAnticipator.anticipateOutageClosed(element, deleteEvent);

    // now delete the service
    m_eventMgr.sendEventToListeners(deleteEvent);
    m_network.removeElement(element);

    verifyAnticipated(5000);
  }
Exemplo n.º 2
0
  private void testElementDownUp(MockElement element) {
    startDaemons();

    resetAnticipated();
    anticipateDown(element);

    MockUtil.println("Bringing down element: " + element);
    element.bringDown();
    MockUtil.println("Finished bringing down element: " + element);

    verifyAnticipated(5000);

    sleep(2000);

    resetAnticipated();
    anticipateUp(element);

    MockUtil.println("Bringing up element: " + element);
    element.bringUp();
    MockUtil.println("Finished bringing up element: " + element);

    verifyAnticipated(8000);
  }