Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 43da5a9

Browse files
akarnokdviktorklang
authored andcommittedNov 30, 2017
Fix javadoc, add Readme.md entry
1 parent ead85b1 commit 43da5a9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
 

‎tck/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,24 @@ The `IdentityProcessorVerification` also runs additional "sanity" verifications,
507507
Specification rules, but help to verify that a `Processor` won't "get stuck" or face similar problems. Please refer to the
508508
sources for details on the tests included.
509509

510+
### Verifying Processors with request-coordinating behavior
511+
512+
A request-coordinating `Processor` is a kind of a `Processor` implementation which may either
513+
514+
- coordinate the request amounts of their `Subscriber`s and request only from upstream when all `Subscriber`s requested something; or
515+
- coordinate emissions, requesting a bounded amount upfront from the upstream and then emitting only when all `Subscriber`s have requested something.
516+
517+
From the downstream `Subscriber`s' perspective (and the TCK), both manifest as lack of emissions, and thus
518+
the following test methods will likely fail with `timeout while awaiting X` error:
519+
520+
- `required_spec104_mustCallOnErrorOnAllItsSubscribersIfItEncountersANonRecoverableError`
521+
- `required_mustRequestFromUpstreamForElementsThatHaveBeenRequestedLongAgo`
522+
523+
To verify such `Processor` implementations, override the `IdentityProcessorVerification.doesCoordinatedEmission()`
524+
method and return `true`, which will instruct the tests above to request from both of their `TestSubscriber`s before
525+
asserting the arrival of the required elements.
526+
527+
510528
## Ignoring tests
511529
Since the tests are inherited instead of user defined it's not possible to use the usual `@Ignore` annotations
512530
to skip certain tests (which may be perfectly reasonable if the implementation has some know constraints on what it

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public void required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue()
424424
* <p>
425425
* The test is not executed if {@link IdentityProcessorVerification#maxSupportedSubscribers()} is less than 2.
426426
* <p>
427-
* If this test fails, the following could be checked within the {@code Publisher} implementation:
427+
* If this test fails, the following could be checked within the {@code Processor} implementation:
428428
* <ul>
429429
* <li>The {@code TestEnvironment} has large enough timeout specified in case the {@code Processor} has some time-delay behavior.</li>
430430
* <li>The {@code Processor} is able to fulfill requests of its {@code Subscriber}s independently of each other's requests or
@@ -709,7 +709,7 @@ public void untested_spec316_requestMustNotThrowExceptionAndMustOnErrorTheSubscr
709709
* <p>
710710
* The test is not executed if {@link IdentityProcessorVerification#maxSupportedSubscribers()} is less than 2.
711711
* <p>
712-
* If this test fails, the following could be checked within the {@code Publisher} implementation:
712+
* If this test fails, the following could be checked within the {@code Processor} implementation:
713713
* <ul>
714714
* <li>The {@code TestEnvironment} has large enough timeout specified in case the {@code Processor} has some time-delay behavior.</li>
715715
* <li>The {@code Processor} is able to fulfill requests of its {@code Subscriber}s independently of each other's requests or

0 commit comments

Comments
 (0)
Please sign in to comment.