Packages

class ManualProbe[I] extends Publisher[I]

Implementation of org.reactivestreams.Publisher that allows various assertions. This probe does not track demand. Therefore you need to expect demand before sending elements downstream.

Source
StreamTestKit.scala
Linear Supertypes
Publisher[I], AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ManualProbe
  2. Publisher
  3. AnyRef
  4. 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. abstract type Self <: ManualProbe[I]

Value Members

  1. def executeAfterSubscription[T](f: => T): T
  2. def expectEventPF[T](f: PartialFunction[PublisherEvent, T]): T
  3. def expectNoMessage(max: FiniteDuration): Self

    Expect no messages for a given duration.

  4. def expectNoMessage(): Self

    Expect no messages.

    Expect no messages. Waits for the default period configured as akka.actor.testkit.expect-no-message-default.

  5. def expectRequest(subscription: Subscription, n: Int): Self

    Expect demand from a given subscription.

  6. def expectSubscription(): PublisherProbeSubscription[I]

    Expect a subscription.

  7. def getPublisher: Publisher[I]
  8. 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.

  9. def subscribe(subscriber: Subscriber[_ >: I]): 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
  10. def within[T](max: FiniteDuration)(f: => T): T

    Same as calling within(0 seconds, max)(f).

  11. 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])
    }

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.

    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.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead