Skip to content

Commit 20b6e76

Browse files
committed
Merge pull request #119 from reactive-streams/wip-fix-114-√
Fixes #114 by removing the outdated test in the TCK and adding guideline...
2 parents 7ba25ff + 0ae3dcb commit 20b6e76

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {
166166
| <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] |
167167
| <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 |
168168
169+
While not mandated, it can be a good idea to cancel a `Processors` upstream `Subscription` when/if its last `Subscriber` cancels their `Subscription`,
170+
to let the cancellation signal propagate upstream.
171+
169172
### Asynchronous vs Synchronous Processing ###
170173
171174
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.

tck/src/main/java/org/reactivestreams/tck/IdentityProcessorVerification.java

-13
Original file line numberDiff line numberDiff line change
@@ -426,19 +426,6 @@ public void onError(Throwable cause) {
426426

427427
////////////////////// OTHER RULE VERIFICATION ///////////////////////////
428428

429-
// A Processor
430-
// must cancel its upstream Subscription if its last downstream Subscription has been cancelled
431-
@Test
432-
public void mustCancelItsUpstreamSubscriptionIfItsLastDownstreamSubscriptionHasBeenCancelled() throws Exception {
433-
new TestSetup(env, processorBufferSize) {{
434-
final ManualSubscriber<T> sub = newSubscriber();
435-
sub.cancel();
436-
expectCancelling();
437-
438-
env.verifyNoAsyncErrors();
439-
}};
440-
}
441-
442429
// A Processor
443430
// must immediately pass on `onError` events received from its upstream to its downstream
444431
@Test

0 commit comments

Comments
 (0)