From 4e0ce724d10b197e680cbc0efbd12c7b7627208e Mon Sep 17 00:00:00 2001 From: akarnokd Date: Tue, 4 Apr 2017 16:47:42 +0200 Subject: [PATCH 1/9] Add Javadoc explanation to the TCK test methods about what they do --- .../support/PublisherVerificationRules.java | 442 ++++++++++++++++++ 1 file changed, 442 insertions(+) diff --git a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java index 5a3116bd..c4d0b145 100644 --- a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java +++ b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java @@ -11,46 +11,488 @@ package org.reactivestreams.tck.support; +import org.reactivestreams.tck.TestEnvironment; /** * Internal TCK use only. * Add / Remove tests for PublisherVerification here to make sure that they arre added/removed in the other places. */ public interface PublisherVerificationRules { + /** + * Validates that the override of {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} + * returns a non-negative value. + * @throws Exception allow checked exceptions to be thrown by the implementation of this test + */ void required_validate_maxElementsFromPublisher() throws Exception; + /** + * Validates that the override of {@link org.reactivestreams.tck.PublisherVerification#boundedDepthOfOnNextAndRequestRecursion()} + * returns a positive value. + * @throws Exception allow checked exceptions to be thrown by the implementation of this test + */ void required_validate_boundedDepthOfOnNextAndRequestRecursion() throws Exception; + /** + * Asks for a {@code Publisher} that should emit exaclty one item and complete (both within a + * timeout specified by {@link TestEnvironment#defaultTimeoutMillis()}). + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} returns zero. + *

This test mostly ensures that the {@code Publisher} implementation is actually operational. + * If this test fails (likely with a timeout error), the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_createPublisher1MustProduceAStreamOfExactly1Element() throws Throwable; + /** + * Asks for a {@code Publisher} that should emit exaclty three items and complete (all within a + * timeout specified by {@link TestEnvironment#defaultTimeoutMillis()}). + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

This test mostly ensures that the {@code Publisher} implementation is actually operational. + * If this test fails (likely with a timeout error), the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_createPublisher3MustProduceAStreamOfExactly3Elements() throws Throwable; + /** + * Asks for a {@code Publisher} that responds to a request pattern of 0 (not requesting upfront), 1, 1 and 2 + * in a timely manner. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 5. + *

This test ensures that the {@code Publisher} implementation correctly responds to {@code request()} calls that in + * total are less than the number of elements this {@code Publisher} could emit (thus the completion event won't be emitted). + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable; + /** + * Asks for a short {@code Publisher} and verifies that requesting once and with more than the length (but bounded) results in the + * correct number of items to be emitted (i.e., length 3 and request 10) followed by an {@code onComplete} signal. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

This test ensures that the {@code Publisher} implementation can deal with larger requests than the number of items it can produce. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec102_maySignalLessThanRequestedAndTerminateSubscription() throws Throwable; + /** + * Asks for a short {@code Publisher} (i.e., length 10), repeatedly subscribes to this {@code Publisher}, requests items + * one by one and verifies the {@code Publisher} calls the {@code onXXX} methods non-overlappingly. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10. + *

Note that this test is probabilistic, that is, may not capture any concurrent invocation in a {code Publisher} implementation. + * Note also that this test is sensitive to cases when a {@code request()} call in {@code onSubscribe()} triggers an asynchronous + * call to the other {@code onXXX} methods. In contrast, the test allows synchronous call chain of + * {@code onSubscribe -> request -> onNext}. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void stochastic_spec103_mustSignalOnMethodsSequentially() throws Throwable; + /** + * Verifies that if the call to {@code PublisherVerification.createErrorPublisher()} returns a non-null {@code Publisher}, + * it calls {@code onSubscribe} exactly once followed by a single call to {@code onError()} without issuing any requests and otherwise + * not throwing any exception. + *

If this test fails, the following could be checked within the error {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec104_mustSignalOnErrorWhenFails() throws Throwable; + /** + * Asks for a short {@code Publisher} (i.e., length 3) and verifies, after requesting one by one, the sequence + * completes normally. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

Note that the tests requests 1 after the items have been received and before expecting an {@code onComplete} signal. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec105_mustSignalOnCompleteWhenFiniteStreamTerminates() throws Throwable; + /** + * Asks for an empty {@code Publisher} (i.e., length 0) and verifies it completes in a timely manner. + *

Note that the tests requests 1 before expecting an {@code onComplete} signal. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec105_emptyStreamMustTerminateBySignallingOnComplete() throws Throwable; + /** + * Currently, this test is skipped because it is unclear this rule can be effectively checked + * on a {@code Publisher} instance without looking into or hooking into the implementation of it. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec106_mustConsiderSubscriptionCancelledAfterOnErrorOrOnCompleteHasBeenCalled() throws Throwable; + /** + * Asks for a single-element {@code Publisher} and checks if requesting after the terminal event doesn't + * lead to more items or terminal signals to be emitted. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1. + *

The tests requests 10 items upfront and 10 items after its completion. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled() throws Throwable; + /** + * Currently, this test is skipped, although it is possible to validate an error {@code Publisher} along + * the same lines as {@link #required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled()}. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec107_mustNotEmitFurtherSignalsOnceOnErrorHasBeenSignalled() throws Throwable; + /** + * Currently, this test is skipped as the expected behavior is currently optional: cancelling a sequence just + * before the terminal event may or may not signal that terminal event. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec108_possiblyCanceledSubscriptionShouldNotReceiveOnErrorOrOnCompleteSignals() throws Throwable; + /** + * Asks for an empty {@code Publisher} and calls and verifies if {@code onSubscribe} was called before any calls + * to the other {@code onXXX} methods. + *

Note that this test doesn't request anything yet an {@code onNext} is not considered as a failure. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec109_mustIssueOnSubscribeForNonNullSubscriber() throws Throwable; + /** + * Currently, this test is skipped because there is no common agreement on what is to be considered a fatal exception and + * besides, {@code Publisher.subscribe} is only allowed throw a {@code NullPointerException} and any other + * exception would require looking into or hooking into the implementation of the {@code Publisher}. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec109_subscribeShouldNotThrowNonFatalThrowable() throws Throwable; + /** + * Asks for an empty {@code Publisher} and calls {@code subscribe} on it with {@code null} that should result in + * a {@code NullPointerException} to be thrown. + *

If this test fails, check if the {@code subscribe()} implementation has an explicit null check (or a method dereference + * on the {@code Subscriber}), especially if the incoming {@code Subscriber} is wrapped or stored to be used later. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec109_subscribeThrowNPEOnNullSubscriber() throws Throwable; + /** + * Verifies that if the call to {@code PublisherVerification.createErrorPublisher()} returns a non-null {@code Publisher}, + * it calls {@code onSubscribe} exactly once followed by a single call to {@code onError()} without issuing any requests. + *

The difference between this test and {@link #optional_spec104_mustSignalOnErrorWhenFails()} is that there is + * no explicit verification if exceptions were thrown in addition to the regular {@code onSubscribe+onError} signal pair. + *

If this test fails, the following could be checked within the error {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec109_mayRejectCallsToSubscribeIfPublisherIsUnableOrUnwillingToServeThemRejectionMustTriggerOnErrorAfterOnSubscribe() throws Throwable; + /** + * Currently, this test is skipped because enforcing rule §1.10 requires unlimited retention and reference-equal checks on + * all incoming {@code Subscriber} which is generally infeasible, plus reusing the same {@code Subscriber} instance is + * better detected (or ignored) inside {@code Subscriber.onSubscribe} when the method is called multiple times. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec110_rejectASubscriptionRequestIfTheSameSubscriberSubscribesTwice() throws Throwable; + /** + * Ask for a single-element {@code Publisher} and subscribes to it twice, without consuming with either {@code Subscriber} instance + * (i.e., no requests are issued). + *

Note that this test ignores what signals the {@code Publisher} emits. Any exception thrown through non-regular + * means will indicate a skipped test. + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec111_maySupportMultiSubscribe() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 5), subscribes 3 {@code Subscriber}s to it, requests with different + * patterns and checks if all 3 received the same events in the same order. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 5. + *

The request pattern for the first {@code Subscriber} is (1, 1, 2, 1); for the second is (2, 3) and for the third is (3, 1, 1). + *

Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of + * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test. + *

Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher}, + * see the skip message for an indication of this. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingOneByOne() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 3), subscribes 3 {@code Subscriber}s to it, requests more than the length items + * upfront with each and verifies they all received the same items in the same order (but does not verify they all complete). + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of + * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test. + *

Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher}, + * see the skip message for an indication of this. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfront() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 3), subscribes 3 {@code Subscriber}s to it, requests more than the length items + * upfront with each and verifies they all received the same items in the same order followed by an {@code onComplete} signal. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of + * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test. + *

Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher}, + * see the skip message for an indication of this. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfrontAndCompleteAsExpected() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 6), requests several times from within {@code onSubscribe} and then requests + * one-by-one from {@code onNext}. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 6. + *

The request pattern is 3 x 1 from within {@code onSubscribe} and one after each {@code onNext} signal. + *

The test consumes the {@code Publisher} but otherwise doesn't verify the {@code Publisher} completes (however, it checks + * for errors). + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

+ * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec302_mustAllowSynchronousRequestCallsFromOnNextAndOnSubscribe() throws Throwable; + /** + * Asks for a {@code Publisher} with length equal to the value returned by {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()} plus 1, + * calls {@code request(1)} externally and then from within {@code onNext} and checks if the stack depth did not increase beyond the + * amount permitted by {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()}. + *

The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than + * {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()} plus 1. + *

If this test fails, the following could be checked within the {@code Publisher} implementation: + *

  • the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,
  • + *
  • make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,
  • + *
  • the implementation doesn't allow unbounded recursion when {@code request()} is called from within {@code onNext}, i.e., the lack of + * reentrant-safe state machine around the request amount (such as a for loop with a bound on the parameter {@code n} that calls {@code onNext}). + * + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec303_mustNotAllowUnboundedRecursion() throws Throwable; + /** + * Currently, this test is skipped because a {@code request} could enter into a synchronous computation via {@code onNext} + * legally and otherwise there is no common agreement on what constitutes as heavy computation. + * @throws Exception allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec304_requestShouldNotPerformHeavyComputations() throws Exception; + /** + * Currently, this test is skipped because there is no common agreement on what constitutes as heavy computation. + * @throws Exception allow arbitrary exceptions to be thrown by the implementation of this test + */ void untested_spec305_cancelMustNotSynchronouslyPerformHeavyCompuatation() throws Exception; + /** + * Asks for a short {@code Publisher} (length 3) and verifies that cancelling without requesting anything, then requesting + * items should result in no signals to be emitted. + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

    The post-cancellation request pattern is (1, 1, 1). + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

  • the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,
  • + *
  • make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,
  • + *
  • the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.
  • + * + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec306_afterSubscriptionIsCancelledRequestMustBeNops() throws Throwable; + /** + * Asks for a single-element {@code Publisher} and verifies that without requesting anything, cancelling the sequence + * multiple times should result in no signals to be emitted and should result in an thrown exception. + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

  • the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,
  • + *
  • make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,
  • + *
  • the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.
  • + * + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec307_afterSubscriptionIsCancelledAdditionalCancelationsMustBeNops() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 10) and issues a {@code request(0)} which should trigger an {@code onError} call + * with an {@code IllegalArgumentException} and the message containing the string "3.9" (reference to the rule number). + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10. + *

    Note that this test expects the {@code IllegalArgumentException} being signalled through {@code onError}, not by + * throwing from {@code request()} (which is also forbidden) or signalling the error by any other means (i.e., through the + * Thread.currentThread().getUncaughtExceptionHandler() for example). + *

    Note also that requesting and emission may happen concurrently and honoring this rule may require extra serialization within + * the {@code Publisher}. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec309_requestZeroMustSignalIllegalArgumentException() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 10) and issues a random, negative {@code request()} call which should trigger an {@code onError} call + * with an {@code IllegalArgumentException} and the message containing the string "3.9" (reference to the rule number). + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10. + *

    Note that this test expects the {@code IllegalArgumentException} being signalled through {@code onError}, not by + * throwing from {@code request()} (which is also forbidden) or signalling the error by any other means (i.e., through the + * Thread.currentThread().getUncaughtExceptionHandler() for example). + *

    Note also that requesting and emission may happen concurrently and honoring this rule may require extra serialization within + * the {@code Publisher}. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec309_requestNegativeNumberMustSignalIllegalArgumentException() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 20), requests some items (less than the length), consumes one item then + * cancels the sequence and verifies the publisher emitted at most the requested amount and stopped emitting (or terminated). + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 20. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec312_cancelMustMakeThePublisherToEventuallyStopSignaling() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 3) requests and consumes one element from it, cancels the {@code Subscription} + * , calls {@code System.gc()} and then checks if all references to the test {@code Subscriber} has been dropped (by checking + * the {@code WeakReference} has been emptied). + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec313_cancelMustMakeThePublisherEventuallyDropAllReferencesToTheSubscriber() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 3) and requests {@code Long.MAX_VALUE} from it, verifying that the + * {@code Publisher} emits all of its items and completes normally. + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec317_mustSupportAPendingElementCountUpToLongMaxValue() throws Throwable; + /** + * Asks for a short {@code Publisher} (length 3) and requests {@code Long.MAX_VALUE} from it in total (split across + * two {@code Long.MAX_VALUE / 2} and one {@code request(1)}), verifying that the + * {@code Publisher} emits all of its items and completes normally. + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec317_mustSupportACumulativePendingElementCountUpToLongMaxValue() throws Throwable; + /** + * Asks for a very long {@code Publisher} (up to {@code Integer.MAX_VALUE}), requests {@code Long.MAX_VALUE - 1} after + * each received item and expects no failure due to a potential overflow in the pending emission count while consuming + * 10 items and cancelling the sequence. + *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than {@code Integer.MAX_VALUE}. + *

    The request pattern is one {@code request(1)} upfront and ten {@code request(Long.MAX_VALUE - 1)} after. + *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *

    + * @throws Throwable allow arbitrary exceptions to be thrown by the implementation of this test + */ void required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue() throws Throwable; } From b3fef0f4472294529c525b0dac41ebbe6b266836 Mon Sep 17 00:00:00 2001 From: akarnokd Date: Tue, 4 Apr 2017 16:51:51 +0200 Subject: [PATCH 2/9] Don't import org.reactivestreams.tck.TestEnvironment --- .../tck/support/PublisherVerificationRules.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java index c4d0b145..68090181 100644 --- a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java +++ b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java @@ -11,8 +11,6 @@ package org.reactivestreams.tck.support; -import org.reactivestreams.tck.TestEnvironment; - /** * Internal TCK use only. * Add / Remove tests for PublisherVerification here to make sure that they arre added/removed in the other places. @@ -32,7 +30,7 @@ public interface PublisherVerificationRules { void required_validate_boundedDepthOfOnNextAndRequestRecursion() throws Exception; /** * Asks for a {@code Publisher} that should emit exaclty one item and complete (both within a - * timeout specified by {@link TestEnvironment#defaultTimeoutMillis()}). + * timeout specified by {@link org.reactivestreams.tck.TestEnvironment#defaultTimeoutMillis()}). *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} returns zero. *

    This test mostly ensures that the {@code Publisher} implementation is actually operational. * If this test fails (likely with a timeout error), the following could be checked within the {@code Publisher} implementation: @@ -52,7 +50,7 @@ public interface PublisherVerificationRules { void required_createPublisher1MustProduceAStreamOfExactly1Element() throws Throwable; /** * Asks for a {@code Publisher} that should emit exaclty three items and complete (all within a - * timeout specified by {@link TestEnvironment#defaultTimeoutMillis()}). + * timeout specified by {@link org.reactivestreams.tck.TestEnvironment#defaultTimeoutMillis()}). *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3. *

    This test mostly ensures that the {@code Publisher} implementation is actually operational. * If this test fails (likely with a timeout error), the following could be checked within the {@code Publisher} implementation: From 8dad5d06f8685a8c2db0483087e1c67fe11242ac Mon Sep 17 00:00:00 2001 From: akarnokd Date: Tue, 4 Apr 2017 17:08:36 +0200 Subject: [PATCH 3/9] Fix missing Javadoc tags --- .../tck/support/PublisherVerificationRules.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java index 68090181..38fd19b0 100644 --- a/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java +++ b/tck/src/main/java/org/reactivestreams/tck/support/PublisherVerificationRules.java @@ -327,6 +327,7 @@ public interface PublisherVerificationRules { *

    The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than * {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()} plus 1. *

    If this test fails, the following could be checked within the {@code Publisher} implementation: + *