Skip to content

Clarified the expected behaviour for triggerRequest #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,23 @@ public interface SubscriberProbe<T> {
* make implement these calls.
*/
public interface SubscriberPuppet {

/**
* Trigger {@code request(elements)} on your {@link Subscriber}
* Ensure that at least {@code elements} are eventually requested by your {@link Subscriber}, if it hasn't already
* requested that many elements.
* <p>
* This does not necessarily have to correlate 1:1 with a {@code Subscription.request(elements)} call, but the sum
* of the elements requested by your {@code Subscriber} must eventually be at least the the sum of the elements
* triggered to be requested by all the invocations of this method.
* <p>
* 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 {@code elements} times, waiting for each element to arrive before the
* next request is made.
* <p>
* 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the following semantics been verified throughout the TCK now? (So that the TCK uses the method appropriately, as described)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jroper Ping :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe it has.

*/
void triggerRequest(long elements);

Expand Down