use of org.opennms.netmgt.poller.monitors.PassiveServiceMonitor in project opennms by OpenNMS.
the class PassiveStatusKeeperIT method testDownPassiveStatus.
@Test
public void testDownPassiveStatus() throws InterruptedException, UnknownHostException {
Event e = createPassiveStatusEvent("Router", "192.168.1.1", "ICMP", "Down");
m_eventMgr.sendNow(e);
PollStatus ps = m_psk.getStatus("Router", "192.168.1.1", "ICMP");
assertTrue(ps.isDown());
MockMonitoredService svc = new MockMonitoredService(1, "Router", InetAddressUtils.addr("192.168.1.1"), "ICMP");
ServiceMonitor m = new PassiveServiceMonitor();
PollStatus ps2 = m.poll(svc, null);
assertEquals(ps, ps2);
}
Aggregations