class Probe[T] extends ManualProbe[T]
Single subscription and demand tracking for TestPublisher.ManualProbe.
- Source
- StreamTestKit.scala
- Alphabetic
- By Inheritance
- Probe
- ManualProbe
- Publisher
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
- type Self = Probe[T]
- Definition Classes
- Probe → ManualProbe
Value Members
- def ensureSubscription(): Unit
Asserts that a subscription has been received or will be received
- def executeAfterSubscription[T](f: => T): T
- Definition Classes
- ManualProbe
- def expectCancellation(): Self
- def expectCancellationWithCause[E <: Throwable](causeClass: Class[E]): E
Java API
- def expectCancellationWithCause[E <: Throwable]()(implicit arg0: ClassTag[E]): E
- def expectCancellationWithCause(expectedCause: Throwable): Self
- def expectEventPF[T](f: PartialFunction[PublisherEvent, T]): T
- Definition Classes
- ManualProbe
- def expectNoMessage(max: FiniteDuration): Self
Expect no messages for a given duration.
Expect no messages for a given duration.
- Definition Classes
- ManualProbe
- def expectNoMessage(): Self
Expect no messages.
Expect no messages. Waits for the default period configured as
akka.actor.testkit.expect-no-message-default
.- Definition Classes
- ManualProbe
- def expectRequest(): Long
- def expectRequest(subscription: Subscription, n: Int): Self
Expect demand from a given subscription.
Expect demand from a given subscription.
- Definition Classes
- ManualProbe
- def expectSubscription(): PublisherProbeSubscription[T]
Expect a subscription.
Expect a subscription.
- Definition Classes
- ManualProbe
- def getPublisher: Publisher[T]
- Definition Classes
- ManualProbe
- def pending: Long
Current pending requests.
- def receiveWhile[T](max: Duration = Duration.Undefined, idle: Duration = Duration.Inf, messages: Int = Int.MaxValue)(f: PartialFunction[PublisherEvent, T]): Seq[T]
Receive messages for a given duration or until one does not match a given partial function.
Receive messages for a given duration or until one does not match a given partial function.
- Definition Classes
- ManualProbe
- def sendComplete(): Self
- def sendError(cause: Throwable): Self
- def sendNext(elem: T): Self
- def subscribe(subscriber: Subscriber[_ >: T]): Unit
Subscribes a given org.reactivestreams.Subscriber to this probe publisher.
Subscribes a given org.reactivestreams.Subscriber to this probe publisher.
- Definition Classes
- ManualProbe → Publisher
- def unsafeSendNext(elem: T): Self
- def within[T](max: FiniteDuration)(f: => T): T
Same as calling
within(0 seconds, max)(f)
.Same as calling
within(0 seconds, max)(f)
.- Definition Classes
- ManualProbe
- def within[T](min: FiniteDuration, max: FiniteDuration)(f: => T): T
Execute code block while bounding its execution time between
min
andmax
.Execute code block while bounding its execution time between
min
andmax
.within
blocks may be nested. All methods in this trait which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosingwithin
block.Note that the timeout is scaled using Duration.dilated, which uses the configuration entry "akka.test.timefactor", while the min Duration is not.
val ret = within(50 millis) { test ! "ping" expectMsgClass(classOf[String]) }
- Definition Classes
- ManualProbe