Skip to content

Fixes #114 by removing the outdated test in the TCK and adding guideline... #119

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
Oct 24, 2014
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {
| <a name="4.1">1</a> | A `Processor` represents a processing stage—which is both a `Subscriber` and a `Publisher` and MUST obey the contracts of both [1] |
| <a name="4.2">2</a> | A `Processor` MAY choose to recover an `onError` signal. If it chooses to do so, it MUST consider the `Subscription` canceled, otherwise it MUST propagate the `onError` signal to its Subscribers immediately |

While not mandated, it can be a good idea to cancel a `Processors` upstream `Subscription` when/if its last `Subscriber` cancels their `Subscription`,
to let the cancellation signal propagate upstream.

### Asynchronous vs Synchronous Processing ###

The Reactive Streams API prescribes that all processing of elements (`onNext`) or termination signals (`onError`, `onComplete`) MUST NOT *block* the `Publisher`. However, each of the `on*` handlers can process the events synchronously or asynchronously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,19 +426,6 @@ public void onError(Throwable cause) {

////////////////////// OTHER RULE VERIFICATION ///////////////////////////

// A Processor
// must cancel its upstream Subscription if its last downstream Subscription has been cancelled
@Test
public void mustCancelItsUpstreamSubscriptionIfItsLastDownstreamSubscriptionHasBeenCancelled() throws Exception {
new TestSetup(env, processorBufferSize) {{
final ManualSubscriber<T> sub = newSubscriber();
sub.cancel();
expectCancelling();

env.verifyNoAsyncErrors();
}};
}

// A Processor
// must immediately pass on `onError` events received from its upstream to its downstream
@Test
Expand Down