use of akka.remote.InvalidAssociation in project controller by opendaylight.
the class QuarantinedMonitorActorTest method testOnReceiveQuarantined.
@Test
public void testOnReceiveQuarantined() throws Exception {
final Throwable t = new RuntimeException("Remote has quarantined this system");
final InvalidAssociation cause = InvalidAssociation.apply(LOCAL, REMOTE, t, Option.apply(null));
final ThisActorSystemQuarantinedEvent event = new ThisActorSystemQuarantinedEvent(LOCAL, REMOTE);
actor.tell(event, ActorRef.noSender());
verify(callback, timeout(1000)).apply();
}
use of akka.remote.InvalidAssociation in project controller by opendaylight.
the class QuarantinedMonitorActorTest method testOnReceiveAnother.
@Test
public void testOnReceiveAnother() throws Exception {
final Address local = Address.apply("http", "local");
final Address remote = Address.apply("http", "remote");
final Throwable t = new RuntimeException("Another exception");
final InvalidAssociation cause = InvalidAssociation.apply(local, remote, t, Option.apply(null));
final AssociationErrorEvent event = new AssociationErrorEvent(cause, local, remote, true, Logging.ErrorLevel());
actor.tell(event, ActorRef.noSender());
verify(callback, never()).apply();
}
Aggregations