use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.Keepalive in project bgpcep by opendaylight.
the class FiniteStateMachineTest method testSessionCharsAccMe.
/**
* Mock PCE does not accept session characteristics the first time.
*
* @throws Exception exception
*/
@Test
public void testSessionCharsAccMe() throws Exception {
this.serverSession.channelActive(null);
assertEquals(1, this.msgsSend.size());
assertTrue(this.msgsSend.get(0) instanceof Open);
final Open remote = (Open) this.msgsSend.get(0);
this.serverSession.handleMessage(this.openMsg);
assertEquals(2, this.msgsSend.size());
assertTrue(this.msgsSend.get(1) instanceof Keepalive);
this.serverSession.handleMessage(Util.createErrorMessage(PCEPErrors.NON_ACC_NEG_SESSION_CHAR, remote.getOpenMessage().getOpen()));
assertEquals(3, this.msgsSend.size());
assertTrue(this.msgsSend.get(2) instanceof Open);
this.serverSession.handleMessage(this.kaMsg);
assertEquals(this.serverSession.getState(), DefaultPCEPSessionNegotiator.State.FINISHED);
}
Aggregations