Package org.apache.pekko.testkit
package org.apache.pekko.testkit
-
ClassDescriptionDispatcher which runs invocations on the current thread only.Custom event filter when the others do not fit the bill.Filter which matches Debug events, if they satisfy the given criteria:
source, if given, applies a filter on the event’s originmessageapplies a filter on the event’s message (either with String.startsWith or Regex.findFirstIn().isDefined) If you want to match all Debug events, the most efficient is to useLeft("").Filter which matches Error events, if they satisfy the given criteria:throwableapplies an upper bound on the type of exception contained in the Error eventsource, if given, applies a filter on the event’s originmessageapplies a filter on the event’s message (either with String.startsWith or Regex.findFirstIn().isDefined); if the message itself does not match, the match is retried with the contained Exception’s message; if both arenull, the filter always matches if at the same time the Exception’s stack trace is empty (this catches JVM-omitted “fast-throw” exceptions) If you want to match all Error events, the most efficient is to useLeft("").Facilities for selectively filtering out expected events from logging so that you can keep your test run’s console output clean and do not miss real error messages.Facilities for selectively filtering out expected events from logging so that you can keep your test run’s console output clean and do not miss real error messages.For testing: scheduler that does not look at the clock, but must be progressed manually by callingtimePasses.Filter which matches Info events, if they satisfy the given criteria:source, if given, applies a filter on the event’s originmessageapplies a filter on the event’s message (either with String.startsWith or Regex.findFirstIn().isDefined) If you want to match all Info events, the most efficient is to useLeft("").Marker trait for test messages that will use Java serialization viaTestJavaSerializerUtilities to get free socket address.Utilities to get free socket address.TestActorRef<T extends Actor>This special ActorRef is exclusively for use during unit testing in a single-threaded environment.A collection of common actor patterns used in tests.BlackholeActor does nothing for incoming messages, its like a blackhole.EchoActor sends back received messages (unmodified).ForwardActor forwards all messages as-is to specified ActorRef.A collection of common actor patterns used in tests.A cyclic barrier wrapper for use in testing.Implementation helpers of the EventFilter facilities: sendMuteto the TestEventListener to install a filter, andUnMuteto uninstall it.Implementation helpers of the EventFilter facilities: sendMuteto the TestEventFilter to install a filter, andUnMuteto uninstall it.EventListener for running tests, which allows selectively filtering out expected messages.A predefined exception that can be used in tests.TestFSMRef<S,D, T extends Actor> This is a specialized form of the TestActorRef with support for querying and setting the state of a FSM.This Serializer uses standard Java Serialization and is useful for tests where ad-hoc messages are created and sent between actor systems.Test kit for testing actors.Implementation trait behind thepekko.testkit.TestKitclass: you may use this if inheriting from a concrete class is not possible.INTERNAL APIINTERNAL APIA count down latch wrapper for use in testing.TestKit-based probe which allows sending, reception and reply.Filter which matches Warning events, if they satisfy the given criteria:source, if given, applies a filter on the event’s originmessageapplies a filter on the event’s message (either with String.startsWith or Regex.findFirstIn().isDefined) If you want to match all Warning events, the most efficient is to useLeft("").