Packages

class Probe[T] extends ManualProbe[T]

Single subscription and demand tracking for TestPublisher.ManualProbe.

Source
StreamTestKit.scala
Linear Supertypes
ManualProbe[T], Publisher[T], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Probe
  2. ManualProbe
  3. Publisher
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Self = Probe[T]
    Definition Classes
    ProbeManualProbe

Value Members

  1. def ensureSubscription(): Unit

    Asserts that a subscription has been received or will be received

  2. def executeAfterSubscription[T](f: => T): T
    Definition Classes
    ManualProbe
  3. def expectCancellation(): Self
  4. def expectCancellationWithCause[E <: Throwable](causeClass: Class[E]): E

    Java API

  5. def expectCancellationWithCause[E <: Throwable]()(implicit arg0: ClassTag[E]): E
  6. def expectCancellationWithCause(expectedCause: Throwable): Self
  7. def expectEventPF[T](f: PartialFunction[PublisherEvent, T]): T
    Definition Classes
    ManualProbe
  8. def expectNoMessage(max: FiniteDuration): Self

    Expect no messages for a given duration.

    Expect no messages for a given duration.

    Definition Classes
    ManualProbe
  9. 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
  10. def expectRequest(): Long
  11. def expectRequest(subscription: Subscription, n: Int): Self

    Expect demand from a given subscription.

    Expect demand from a given subscription.

    Definition Classes
    ManualProbe
  12. def expectSubscription(): PublisherProbeSubscription[T]

    Expect a subscription.

    Expect a subscription.

    Definition Classes
    ManualProbe
  13. def getPublisher: Publisher[T]
    Definition Classes
    ManualProbe
  14. def pending: Long

    Current pending requests.

  15. 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
  16. def sendComplete(): Self
  17. def sendError(cause: Throwable): Self
  18. def sendNext(elem: T): Self
  19. 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
  20. def unsafeSendNext(elem: T): Self
  21. 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
  22. def within[T](min: FiniteDuration, max: FiniteDuration)(f: => T): T

    Execute code block while bounding its execution time between min and max.

    Execute code block while bounding its execution time between min and max. 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 enclosing within 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