use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev171025.AddLspOutput in project bgpcep by opendaylight.
the class Stateful07TopologySessionListenerTest method testOnServerSessionManagerDown.
/**
* All the pcep session registration should be closed when the session manager is closed.
*/
@Test
public void testOnServerSessionManagerDown() throws InterruptedException, ExecutionException, TransactionCommitFailedException {
this.listener.onSessionUp(this.session);
// the session should not be closed when session manager is up
assertFalse(this.session.isClosed());
// send request
final Future<RpcResult<AddLspOutput>> futureOutput = this.topologyRpcs.addLsp(createAddLspInput());
stopSessionManager();
final AddLspOutput output = futureOutput.get().getResult();
// deal with unsent request after session down
assertEquals(FailureType.Unsent, output.getFailure());
// verify the session is closed after server session manager is closed
assertTrue(this.session.isClosed());
}
Aggregations