Package org.apache.pekko.testkit
Class TestEventListener
java.lang.Object
org.apache.pekko.event.Logging.DefaultLogger
org.apache.pekko.testkit.TestEventListener
- All Implemented Interfaces:
Actor,RequiresMessageQueue<LoggerMessageQueueSemantics>,Logging.StdOutLogger
EventListener for running tests, which allows selectively filtering out
expected messages. To use it, include something like this into
pekko.test.conf and run your tests with system property
"pekko.mode" set to "test":
pekko {
loggers = ["org.apache.pekko.testkit.TestEventListener"]
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilter(EventFilter filter) booleanfilter(Logging.LogEvent event) scala.collection.immutable.List<EventFilter>filters()voidfilters_$eq(scala.collection.immutable.List<EventFilter> x$1) scala.PartialFunction<Object,scala.runtime.BoxedUnit> receive()Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.voidremoveFilter(EventFilter filter) Methods inherited from class org.apache.pekko.event.Logging.DefaultLogger
context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, selfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, supervisorStrategy, unhandled
-
Constructor Details
-
TestEventListener
public TestEventListener()
-
-
Method Details
-
addFilter
-
filter
-
filters
-
filters_$eq
-
receive
Description copied from interface:ActorScala API: This defines the initial actor behavior, it must return a partial function with the actor logic.- Specified by:
receivein interfaceActor- Overrides:
receivein classLogging.DefaultLogger
-
removeFilter
-