Implementation of org.reactivestreams.Subscriber that allows various assertions.
All timeouts are dilated automatically, for more details about time dilation refer to pekko.testkit.TestKit.
Attributes
- Companion
- object
- Source
- StreamTestKit.scala
- Graph
-
- Supertypes
- Known subtypes
-
class Probe[T]
Members list
Type members
Types
Attributes
- Source
- StreamTestKit.scala
Value members
Concrete methods
Fluent DSL
Expect and return the signalled java.lang.Throwable.
Fluent DSL
Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Attributes
- Source
- StreamTestKit.scala
Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Expect and return SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Fluent DSL
Fluent DSL
Expect SubscriberEvent (any of: OnSubscribe, OnNext, OnError or OnComplete).
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
JAVA API
Expect and return a stream element.
Expect and return a stream element during specified time or timeout.
Expect and return a stream element during specified time or timeout.
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Expect and return a stream element during specified time or timeout.
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Fluent DSL
Fluent DSL
Fluent DSL
Expect a stream element during specified time or timeout.
Attributes
- Source
- StreamTestKit.scala
JAVA PAI
JAVA PAI
Fluent DSL
Expect a stream element during specified time or timeout.
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Fluent DSL
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.
Value parameters
- max
-
wait no more than max time, otherwise throw AssertionError
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Expect a stream element during specified time or timeout and test it with partial function.
Allows chaining probe methods.
Value parameters
- max
-
wait no more than max time, otherwise throw AssertionError
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
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.
Attributes
- Source
- StreamTestKit.scala
Expect and return the next n stream elements.
Fluent DSL Expect the given elements to be signalled in order.
Fluent DSL Expect the given elements to be signalled in order.
Attributes
- Source
- StreamTestKit.scala
Fluent DSL Expect the given elements to be signalled in order.
Fluent DSL Expect the given elements to be signalled in order.
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Expect next element or stream completion - returning whichever was signalled.
Expect next element or stream completion - returning whichever was signalled.
Attributes
- Source
- StreamTestKit.scala
Fluent DSL
Fluent DSL
Fluent DSL
Expect given next element or error signal, returning whichever was signalled.
Attributes
- Source
- StreamTestKit.scala
Fluent DSL Expect given next element or error signal.
Expect a stream element and test it with partial function.
Fluent DSL
Fluent DSL
Expect multiple stream elements in arbitrary order.
Attributes
- Source
- StreamTestKit.scala
Fluent DSL Expect the given elements to be signalled in any order.
Fluent DSL Expect the given elements to be signalled in any order.
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Fluent DSL Expect the given elements to be signalled in any order.
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Expect a stream element and test it with partial function.
Expect a stream element and test it with partial function.
Value parameters
- max
-
wait no more than max time, otherwise throw AssertionError
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Expect a stream element and test it with partial function.
Value parameters
- max
-
wait no more than max time, otherwise throw AssertionError
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Fluent DSL
Fluent DSL
Assert that no message is received for the specified time.
Attributes
- Source
- StreamTestKit.scala
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".
Attributes
- Source
- StreamTestKit.scala
Java API: Assert that no message is received for the specified time.
Java API: Assert that no message is received for the specified time.
Attributes
- Source
- StreamTestKit.scala
Expect and return a org.reactivestreams.Subscription.
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.
Attributes
- Source
- StreamTestKit.scala
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.
Attributes
- Source
- StreamTestKit.scala
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.
Attributes
- Source
- StreamTestKit.scala
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().
Attributes
- Source
- StreamTestKit.scala
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.
Attributes
- Source
- StreamTestKit.scala
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
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
Attributes
- Source
- StreamTestKit.scala
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.
Attributes
- Source
- StreamTestKit.scala
JAVA API
JAVA API
Receive messages for a given duration or until one does not match a given partial function.
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Drains a given number of messages
JAVA API
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!'''
Attributes
- Source
- StreamTestKit.scala
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!'''
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
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.
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])
}
Attributes
- Source
- StreamTestKit.scala
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])
}
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Same as calling within(0 seconds, max)(f).
JAVA API
JAVA API
Same as calling within(Duration.ofSeconds(0), max)(f).
Attributes
- Since
-
1.1.0
- Source
- StreamTestKit.scala
Deprecated methods
Fluent DSL
Fluent DSL
Same as expectNoMsg(remaining), but correctly treating the timeFactor. NOTE! Timeout value is automatically multiplied by timeFactor.
Attributes
- Deprecated
-
[Since version Akka 2.5.5]Use expectNoMessage instead - Source
- StreamTestKit.scala
Fluent DSL
Fluent DSL
Assert that no message is received for the specified time. NOTE! Timeout value is automatically multiplied by timeFactor.
Attributes
- Deprecated
-
[Since version Akka 2.5.5]Use expectNoMessage instead - Source
- StreamTestKit.scala