Class

akka.stream.testkit.TestSubscriber

Probe

Related Doc: package TestSubscriber

Permalink

class Probe[T] extends ManualProbe[T]

Single subscription tracking for ManualProbe.

Source
StreamTestKit.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Probe
  2. ManualProbe
  3. Subscriber
  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]

    Permalink
    Definition Classes
    ProbeManualProbe

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to any2stringadd[Probe[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Probe[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to ArrowAssoc[Probe[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def cancel(): Self

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensureSubscription(): Self

    Permalink

    Asserts that a subscription has been received or will be received

  10. def ensuring(cond: (Probe[T]) ⇒ Boolean, msg: ⇒ Any): Probe[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to Ensuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (Probe[T]) ⇒ Boolean): Probe[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to Ensuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): Probe[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to Ensuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): Probe[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to Ensuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def expectComplete(): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect completion.

    Definition Classes
    ManualProbe
  17. def expectError(cause: Throwable): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect given Throwable.

    Definition Classes
    ManualProbe
  18. def expectError(): Throwable

    Permalink

    Expect and return the signalled Throwable.

    Expect and return the signalled Throwable.

    Definition Classes
    ManualProbe
  19. def expectEvent(event: SubscriberEvent): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).

    Definition Classes
    ManualProbe
  20. def expectEvent(max: FiniteDuration): SubscriberEvent

    Permalink

    Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).

    Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).

    Definition Classes
    ManualProbe
  21. def expectEvent(): SubscriberEvent

    Permalink

    Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).

    Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).

    Definition Classes
    ManualProbe
  22. def expectEventPF[T](f: PartialFunction[SubscriberEvent, T]): T

    Permalink
    Definition Classes
    ManualProbe
  23. def expectEventWithTimeoutPF[T](max: Duration, f: PartialFunction[SubscriberEvent, T]): T

    Permalink
    Definition Classes
    ManualProbe
  24. def expectNext(e1: T, e2: T, es: T*): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect multiple stream elements.

    Definition Classes
    ManualProbe
    Annotations
    @varargs()
  25. def expectNext(d: FiniteDuration, element: T): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect a stream element during specified time or timeout.

    Definition Classes
    ManualProbe
  26. def expectNext(element: T): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect a stream element.

    Definition Classes
    ManualProbe
  27. def expectNext(d: FiniteDuration): T

    Permalink

    Expect and return a stream element during specified time or timeout.

    Expect and return a stream element during specified time or timeout.

    Definition Classes
    ManualProbe
  28. def expectNext(): T

    Permalink

    Expect and return a stream element.

    Expect and return a stream element.

    Definition Classes
    ManualProbe
  29. def expectNextChainingPF(f: PartialFunction[Any, Any]): Self

    Permalink

    Expect a stream element during specified time or timeout and test it with partial function.

    Expect a stream element during specified time or timeout and test it with partial function.

    Allows chaining probe methods.

    Definition Classes
    ManualProbe
  30. def expectNextChainingPF(max: Duration, f: PartialFunction[Any, Any]): Self

    Permalink

    Expect a stream element during specified time or timeout and test it with partial function.

    Expect a stream element during specified time or timeout and test it with partial function.

    Allows chaining probe methods.

    max

    wait no more than max time, otherwise throw AssertionError

    Definition Classes
    ManualProbe
  31. def expectNextN(all: Seq[T]): Self

    Permalink

    Fluent DSL Expect the given elements to be signalled in order.

    Fluent DSL Expect the given elements to be signalled in order.

    Definition Classes
    ManualProbe
  32. def expectNextN(n: Long): Seq[T]

    Permalink

    Expect and return the next n stream elements.

    Expect and return the next n stream elements.

    Definition Classes
    ManualProbe
  33. def expectNextOrComplete(element: T): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect given next element or stream completion.

    Definition Classes
    ManualProbe
  34. def expectNextOrComplete(): Either[OnComplete.type, T]

    Permalink

    Expect next element or stream completion - returning whichever was signalled.

    Expect next element or stream completion - returning whichever was signalled.

    Definition Classes
    ManualProbe
  35. def expectNextOrError(element: T, cause: Throwable): Either[Throwable, T]

    Permalink

    Fluent DSL Expect given next element or error signal.

    Fluent DSL Expect given next element or error signal.

    Definition Classes
    ManualProbe
  36. def expectNextOrError(): Either[Throwable, T]

    Permalink

    Fluent DSL

    Fluent DSL

    Expect given next element or error signal, returning whichever was signalled.

    Definition Classes
    ManualProbe
  37. def expectNextPF[T](f: PartialFunction[Any, T]): T

    Permalink

    Expect a stream element and test it with partial function.

    Expect a stream element and test it with partial function.

    Definition Classes
    ManualProbe
  38. def expectNextUnordered(e1: T, e2: T, es: T*): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect multiple stream elements in arbitrary order.

    Definition Classes
    ManualProbe
    Annotations
    @varargs()
  39. def expectNextUnorderedN(all: Seq[T]): Self

    Permalink

    Fluent DSL Expect the given elements to be signalled in any order.

    Fluent DSL Expect the given elements to be signalled in any order.

    Definition Classes
    ManualProbe
  40. def expectNextWithTimeoutPF[T](max: Duration, f: PartialFunction[Any, T]): T

    Permalink

    Expect a stream element and test it with partial function.

    Expect a stream element and test it with partial function.

    max

    wait no more than max time, otherwise throw AssertionError

    Definition Classes
    ManualProbe
  41. def expectNoMessage(remaining: Duration): Self

    Permalink

    Java API: Assert that no message is received for the specified time.

    Java API: Assert that no message is received for the specified time.

    Definition Classes
    ManualProbe
  42. def expectNoMessage(remaining: FiniteDuration): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Assert that no message is received for the specified time.

    Definition Classes
    ManualProbe
  43. def expectSubscription(): Subscription

    Permalink

    Expect and return a org.reactivestreams.Subscription.

    Expect and return a org.reactivestreams.Subscription.

    Definition Classes
    ManualProbe
  44. def expectSubscriptionAndComplete(signalDemand: Boolean): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect subscription followed by immediate stream completion.

    Depending on the signalDemand parameter demand may be signalled immediately after obtaining the subscription in order to wake up a possibly lazy upstream. You can disable this by setting the signalDemand parameter to false.

    See also #expectSubscriptionAndComplete.

    Definition Classes
    ManualProbe
  45. def expectSubscriptionAndComplete(): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect subscription followed by immediate stream completion. By default 1 demand will be signalled in order to wake up a possibly lazy upstream

    See also Boolean) if no demand should be signalled.

    Definition Classes
    ManualProbe
  46. def expectSubscriptionAndError(cause: Throwable, signalDemand: Boolean): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect subscription followed by immediate stream completion. By default 1 demand will be signalled in order to wake up a possibly lazy upstream

    See also Throwable).

    Definition Classes
    ManualProbe
  47. def expectSubscriptionAndError(cause: Throwable): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Expect subscription followed by immediate stream completion.

    By default 1 demand will be signalled in order to wake up a possibly lazy upstream.

    See also Throwable, signalDemand: Boolean) if no demand should be signalled.

    Definition Classes
    ManualProbe
  48. def expectSubscriptionAndError(signalDemand: Boolean): Throwable

    Permalink

    Expect subscription to be followed immediately by an error signal.

    Expect subscription to be followed immediately by an error signal.

    Depending on the signalDemand parameter demand may be signalled immediately after obtaining the subscription in order to wake up a possibly lazy upstream. You can disable this by setting the signalDemand parameter to false.

    See also #expectSubscriptionAndError().

    Definition Classes
    ManualProbe
  49. def expectSubscriptionAndError(): Throwable

    Permalink

    Expect subscription to be followed immediately by an error signal.

    Expect subscription to be followed immediately by an error signal.

    By default 1 demand will be signalled in order to wake up a possibly lazy upstream.

    See also #expectSubscriptionAndError(Boolean) if no demand should be signalled.

    Definition Classes
    ManualProbe
  50. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  51. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to StringFormat[Probe[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  52. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  53. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  54. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  58. def onComplete(): Unit

    Permalink
    Definition Classes
    ManualProbe → Subscriber
  59. def onError(cause: Throwable): Unit

    Permalink
    Definition Classes
    ManualProbe → Subscriber
  60. def onNext(element: T): Unit

    Permalink
    Definition Classes
    ManualProbe → Subscriber
  61. def onSubscribe(subscription: Subscription): Unit

    Permalink
    Definition Classes
    ManualProbe → Subscriber
  62. def receiveWhile[T](max: Duration = Duration.Undefined, idle: Duration = Duration.Inf, messages: Int = Int.MaxValue)(f: PartialFunction[SubscriberEvent, T]): Seq[T]

    Permalink

    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
  63. def receiveWithin(max: FiniteDuration, messages: Int = Int.MaxValue): Seq[T]

    Permalink

    Drains a given number of messages

    Drains a given number of messages

    Definition Classes
    ManualProbe
  64. def request(n: Long): Self

    Permalink
  65. def requestNext(d: FiniteDuration): T

    Permalink

    Request and expect a stream element during the specified time or timeout.

  66. def requestNext(): T

    Permalink

    Request and expect a stream element.

  67. def requestNext(element: T): Self

    Permalink

    Request and expect a stream element.

  68. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  69. def toStrict(atMost: FiniteDuration): Seq[T]

    Permalink

    Attempt to drain the stream into a strict collection (by requesting Long.MaxValue elements).

    Attempt to drain the stream into a strict collection (by requesting Long.MaxValue elements).

    Use with caution: Be warned that this may not be a good idea if the stream is infinite or its elements are very large!

    Definition Classes
    ManualProbe
  70. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  71. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  72. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  73. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. def within[T](max: FiniteDuration)(f: ⇒ T): T

    Permalink

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

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

    Definition Classes
    ManualProbe
  75. def within[T](min: FiniteDuration, max: FiniteDuration)(f: ⇒ T): T

    Permalink

    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
  76. def [B](y: B): (Probe[T], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Probe[T] to ArrowAssoc[Probe[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def expectNoMsg(remaining: FiniteDuration): Self

    Permalink

    Fluent DSL

    Fluent DSL

    Assert that no message is received for the specified time. 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

    Permalink

    Fluent DSL

    Fluent DSL

    Same as expectNoMsg(remaining), but correctly treating the timeFactor. NOTE! Timeout value is automatically multiplied by timeFactor.

    Definition Classes
    ManualProbe
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

Inherited from ManualProbe[T]

Inherited from Subscriber[T]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Probe[T] to any2stringadd[Probe[T]]

Inherited by implicit conversion StringFormat from Probe[T] to StringFormat[Probe[T]]

Inherited by implicit conversion Ensuring from Probe[T] to Ensuring[Probe[T]]

Inherited by implicit conversion ArrowAssoc from Probe[T] to ArrowAssoc[Probe[T]]

Ungrouped