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
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. All

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 expectEventPF[T](f: PartialFunction[PublisherEvent, T]): T
    Definition Classes
    ManualProbe
  5. def expectNoMessage(max: FiniteDuration): Self

    Expect no messages for a given duration.

    Expect no messages for a given duration.

    Definition Classes
    ManualProbe
  6. def expectNoMessage(): Self

    Expect no messages.

    Expect no messages.

    Definition Classes
    ManualProbe
  7. def expectRequest(): Long
  8. def expectRequest(subscription: Subscription, n: Int): Self

    Expect demand from a given subscription.

    Expect demand from a given subscription.

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

    Expect a subscription.

    Expect a subscription.

    Definition Classes
    ManualProbe
  10. def getPublisher: Publisher[T]
    Definition Classes
    ManualProbe
  11. def pending: Long

    Current pending requests.

  12. 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
  13. def sendComplete(): Self
  14. def sendError(cause: Throwable): Self
  15. def sendNext(elem: T): Self
  16. 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
  17. def unsafeSendNext(elem: T): Self
  18. 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
  19. 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

Deprecated Value Members

  1. def expectNoMsg(max: FiniteDuration): Self

    Expect no messages for a given duration.

    Expect no messages for a given duration. NOTE! Timeout value is automatically multiplied by timeFactor.

    Definition Classes
    ManualProbe
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

  2. def expectNoMsg(): Self

    Expect no messages.

    Expect no messages. NOTE! Timeout value is automatically multiplied by timeFactor.

    Definition Classes
    ManualProbe
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead