use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address in project bgpcep by opendaylight.
the class PCCTunnelManagerImplTest method testReturnDelegationNonDelegatedLsp.
@Test
public void testReturnDelegationNonDelegatedLsp() {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(1, ADDRESS, 0, 0, TIMER, this.timerHandler);
tunnelManager.onSessionUp(this.session1);
tunnelManager.onSessionUp(this.session2);
tunnelManager.onMessagePcupd(createUpdate(1), this.session2);
Mockito.verify(this.session2, Mockito.times(1)).sendError(Mockito.any(Pcerr.class));
assertEquals(PCEPErrors.UPDATE_REQ_FOR_NON_LSP, this.errorsSession2.get(0));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address in project bgpcep by opendaylight.
the class PCCTunnelManagerImplTest method testReportToAllNonDelegatedLsp.
@Test
public void testReportToAllNonDelegatedLsp() {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(1, ADDRESS, 0, 0, TIMER, this.timerHandler);
tunnelManager.onSessionUp(this.session1);
tunnelManager.onSessionUp(this.session2);
tunnelManager.onMessagePcupd(createUpdateDelegate(1), this.session2);
Mockito.verify(this.session2, Mockito.times(1)).sendError(Mockito.any(Pcerr.class));
assertEquals(PCEPErrors.UPDATE_REQ_FOR_NON_LSP, this.errorsSession2.get(0));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address in project bgpcep by opendaylight.
the class PCCTunnelManagerImplTest method testReturnDelegationUnknownLsp.
@Test
public void testReturnDelegationUnknownLsp() {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(1, ADDRESS, 0, 0, TIMER, this.timerHandler);
tunnelManager.onSessionUp(this.session1);
tunnelManager.onMessagePcupd(createUpdate(2), this.session1);
Mockito.verify(this.session1, Mockito.times(1)).sendError(Mockito.any(Pcerr.class));
assertEquals(PCEPErrors.UNKNOWN_PLSP_ID, this.errorsSession1.get(0));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address in project bgpcep by opendaylight.
the class PCCTunnelManagerImplTest method testAddTunnel.
@Test
public void testAddTunnel() {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(0, ADDRESS, 0, 0, TIMER, this.timerHandler);
tunnelManager.onSessionUp(this.session1);
tunnelManager.onSessionUp(this.session2);
tunnelManager.onMessagePcInitiate(createRequests(1), this.session1);
Mockito.verify(this.session1, Mockito.times(1)).sendReport(Mockito.any(Pcrpt.class));
Mockito.verify(this.session2, Mockito.times(1)).sendReport(Mockito.any(Pcrpt.class));
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.Address in project bgpcep by opendaylight.
the class PCCTunnelManagerImplTest method testOnSessionDownAndDelegateBack.
@Test
public void testOnSessionDownAndDelegateBack() throws InterruptedException {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(1, ADDRESS, 1, 10, TIMER, this.timerHandler);
checkSessionUp(this.session1, tunnelManager);
checkSessionUp(this.session2, tunnelManager);
checkSessionDown(this.session1, tunnelManager);
tunnelManager.onSessionUp(this.session1);
Mockito.verify(this.session1, Mockito.times(4)).sendReport(Mockito.any(Pcrpt.class));
Mockito.verify(this.session2, Mockito.times(2)).sendReport(Mockito.any(Pcrpt.class));
}
Aggregations