Packages

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

Type Members

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Probe[T] toany2stringadd[Probe[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Probe[T], B)
    Implicit
    This member is added by an implicit conversion from Probe[T] toArrowAssoc[Probe[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cancel(cause: Throwable): Self
  8. def cancel(): Self
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  10. def ensureSubscription(): Self

    Asserts that a subscription has been received or will be received

  11. def ensuring(cond: (Probe[T]) => Boolean, msg: => Any): Probe[T]
    Implicit
    This member is added by an implicit conversion from Probe[T] toEnsuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Probe[T]) => Boolean): Probe[T]
    Implicit
    This member is added by an implicit conversion from Probe[T] toEnsuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => Any): Probe[T]
    Implicit
    This member is added by an implicit conversion from Probe[T] toEnsuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Probe[T]
    Implicit
    This member is added by an implicit conversion from Probe[T] toEnsuring[Probe[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def expectComplete(): Self

    Fluent DSL

    Fluent DSL

    Expect completion.

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

    Fluent DSL

    Fluent DSL

    Expect given java.lang.Throwable.

    Definition Classes
    ManualProbe
  19. def expectError(): Throwable

    Expect and return the signalled java.lang.Throwable.

    Expect and return the signalled java.lang.Throwable.

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

    Fluent DSL

    Fluent DSL

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

    Definition Classes
    ManualProbe
  21. def expectEvent(max: Duration): SubscriberEvent

    JAVA API

    JAVA API

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

    Definition Classes
    ManualProbe
    Since

    1.1.0

  22. def expectEvent(max: FiniteDuration): SubscriberEvent

    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
  23. def expectEvent(): SubscriberEvent

    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
  24. def expectEventPF[T](f: PartialFunction[SubscriberEvent, T]): T
    Definition Classes
    ManualProbe
  25. def expectEventWithTimeoutPF[T](max: Duration, f: PartialFunction[SubscriberEvent, T]): T

    JAVA API

    JAVA API

    Definition Classes
    ManualProbe
    Since

    1.1.0

  26. def expectEventWithTimeoutPF[T](max: Duration, f: PartialFunction[SubscriberEvent, T]): T
    Definition Classes
    ManualProbe
  27. def expectNext(e1: T, e2: T, es: T*): Self

    Fluent DSL

    Fluent DSL

    Expect multiple stream elements.

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

    JAVA PAI

    JAVA PAI

    Fluent DSL

    Expect a stream element during specified time or timeout.

    Definition Classes
    ManualProbe
    Since

    1.1.0

  29. def expectNext(d: FiniteDuration, element: T): Self

    Fluent DSL

    Fluent DSL

    Expect a stream element during specified time or timeout.

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

    Fluent DSL

    Fluent DSL

    Expect a stream element.

    Definition Classes
    ManualProbe
  31. def expectNext(d: Duration): T

    JAVA API

    JAVA API

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

    Definition Classes
    ManualProbe
    Since

    1.1.0

  32. def expectNext(d: FiniteDuration): T

    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
  33. def expectNext(): T

    Expect and return a stream element.

    Expect and return a stream element.

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

    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
  35. def expectNextChainingPF(max: Duration, f: PartialFunction[Any, Any]): Self

    JAVA API

    JAVA API

    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
    Since

    1.1.0

  36. def expectNextChainingPF(max: Duration, f: PartialFunction[Any, Any]): Self

    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
  37. def expectNextN(elems: List[T]): Self

    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
    Since

    1.1.0

  38. def expectNextN(all: Seq[T]): Self

    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
  39. def expectNextN(n: Long): Seq[T]

    Expect and return the next n stream elements.

    Expect and return the next n stream elements.

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

    Fluent DSL

    Fluent DSL

    Expect given next element or stream completion.

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

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

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

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

    Fluent DSL Expect given next element or error signal.

    Fluent DSL Expect given next element or error signal.

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

    Fluent DSL

    Fluent DSL

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

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

    Expect a stream element and test it with partial function.

    Expect a stream element and test it with partial function.

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

    Fluent DSL

    Fluent DSL

    Expect multiple stream elements in arbitrary order.

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

    JAVA API

    JAVA API

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

    Definition Classes
    ManualProbe
    Since

    1.1.0

  47. def expectNextUnorderedN(all: Seq[T]): Self

    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
  48. def expectNextWithTimeoutPF[T](max: Duration, f: PartialFunction[Any, T]): T

    JAVA API

    JAVA API

    Expect a stream element and test it with partial function.

    max

    wait no more than max time, otherwise throw AssertionError

    Definition Classes
    ManualProbe
    Since

    1.1.0

  49. def expectNextWithTimeoutPF[T](max: Duration, f: PartialFunction[Any, T]): T

    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
  50. def expectNoMessage(remaining: Duration): Self

    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
  51. def expectNoMessage(): Self

    Fluent DSL

    Fluent DSL

    Assert that no message is received for the specified time. Waits for the default period configured as pekko.test.expect-no-message-default. That timeout is scaled using the configuration entry "pekko.test.timefactor".

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

    Fluent DSL

    Fluent DSL

    Assert that no message is received for the specified time.

    Definition Classes
    ManualProbe
  53. def expectSubscription(): Subscription

    Expect and return a org.reactivestreams.Subscription.

    Expect and return a org.reactivestreams.Subscription.

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

    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
  55. def expectSubscriptionAndComplete(): Self

    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 #expectSubscriptionAndComplete(signalDemand: Boolean) if no demand should be signalled.

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

    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 #expectSubscriptionAndError(cause: Throwable).

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

    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 #expectSubscriptionAndError(cause: Throwable, signalDemand: Boolean) if no demand should be signalled.

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

    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
  59. def expectSubscriptionAndError(): Throwable

    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(signalDemand: Boolean) if no demand should be signalled.

    Definition Classes
    ManualProbe
  60. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  61. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  62. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  63. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  64. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  65. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  66. def onComplete(): Unit
    Definition Classes
    ManualProbe → Subscriber
  67. def onError(cause: Throwable): Unit
    Definition Classes
    ManualProbe → Subscriber
  68. def onNext(element: T): Unit
    Definition Classes
    ManualProbe → Subscriber
  69. def onSubscribe(subscription: Subscription): Unit
    Definition Classes
    ManualProbe → Subscriber
  70. def receiveWhile[T](max: Duration, idle: Duration, messages: Int, f: PartialFunction[SubscriberEvent, T]): List[T]

    JAVA API

    JAVA API

    Receive messages for a given duration or until one does not match a given partial function.

    Definition Classes
    ManualProbe
    Since

    1.1.0

  71. def receiveWhile[T](max: Duration = Duration.Undefined, idle: Duration = Duration.Inf, messages: Int = Int.MaxValue)(f: PartialFunction[SubscriberEvent, 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
  72. def receiveWithin(max: Duration, messages: Int): List[T]

    JAVA API

    JAVA API

    Drains a given number of messages

    Definition Classes
    ManualProbe
    Since

    1.1.0

  73. def receiveWithin(max: FiniteDuration, messages: Int = Int.MaxValue): Seq[T]

    Drains a given number of messages

    Drains a given number of messages

    Definition Classes
    ManualProbe
  74. def request(n: Long): Self
  75. def requestNext(d: Duration): T

    JAVA API

    JAVA API

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

    Since

    1.1.0

  76. def requestNext(d: FiniteDuration): T

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

  77. def requestNext(): T

    Request and expect a stream element.

  78. def requestNext(element: T): Self

    Request and expect a stream element.

  79. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  80. def toStrict(atMost: Duration): List[T]

    JAVA API

    JAVA API

    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
    Since

    1.1.0

  81. def toStrict(atMost: FiniteDuration): Seq[T]

    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
  82. def toString(): String
    Definition Classes
    AnyRef → Any
  83. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  84. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  85. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  86. def within[T](max: Duration)(creator: Creator[T]): T

    JAVA API

    JAVA API

    Same as calling within(Duration.ofSeconds(0), max)(f).

    Definition Classes
    ManualProbe
    Since

    1.1.0

  87. 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
  88. def within[T](min: Duration, max: Duration, creator: Creator[T]): T

    JAVA API

    JAVA API

    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 "pekko.test.timefactor", while the min Duration is not.

    val ret = within(Duration.ofMillis(50)) {
      test ! "ping"
      expectMsgClass(classOf[String])
    }
    Definition Classes
    ManualProbe
    Since

    1.1.0

  89. 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 "pekko.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(remaining: FiniteDuration): Self

    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 Akka 2.5.5) Use expectNoMessage instead

  2. def expectNoMsg(): Self

    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 Akka 2.5.5) Use expectNoMessage instead

  3. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  4. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Probe[T] toStringFormat[Probe[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  5. def [B](y: B): (Probe[T], B)
    Implicit
    This member is added by an implicit conversion from Probe[T] toArrowAssoc[Probe[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from ManualProbe[T]

Inherited from Subscriber[T]

Inherited from AnyRef

Inherited from Any

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

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

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

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

Ungrouped