Interface SubscriberWhiteboxVerification.SubscriberPuppet
- Enclosing class:
SubscriberWhiteboxVerification<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Triggercancel()
on yourSubscriber
.void
triggerRequest
(long elements) Ensure that at leastelements
are eventually requested by yourSubscriber
, if it hasn't already requested that many elements.
-
Method Details
-
triggerRequest
void triggerRequest(long elements) Ensure that at leastelements
are eventually requested by yourSubscriber
, if it hasn't already requested that many elements.This does not necessarily have to correlate 1:1 with a
Subscription.request(elements)
call, but the sum of the elements requested by yourSubscriber
must eventually be at least the the sum of the elements triggered to be requested by all the invocations of this method.Additionally, subscribers are permitted to delay requesting elements until previous requests for elements have been fulfilled. For example, a subscriber that only requests one element at a time may fulfill the request made by this method by requesting one element
elements
times, waiting for each element to arrive before the next request is made.Before sending any element to the subscriber, the TCK must wait for the subscriber to request that element, and must be prepared for the subscriber to only request one element at a time, it is not enough for the TCK to simply invoke this method before sending elements.
An invocation of
signalCancel()
may be coalesced into any elements that have not yet been requested, such that only a cancel signal is emitted. -
signalCancel
void signalCancel()Triggercancel()
on yourSubscriber
.An invocation of this method may be coalesced into any outstanding requests, as requested by
triggerRequest(long)
, such that only a cancel signal is emitted.
-