test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/flow/support/PublisherVerificationRules.java
changeset 55546 3ae57bbf9585
equal deleted inserted replaced
55545:8a153a932d0f 55546:3ae57bbf9585
       
     1 /*
       
     2  * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.
       
     8  *
       
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    12  * version 2 for more details (a copy is included in the LICENSE file that
       
    13  * accompanied this code).
       
    14  *
       
    15  * You should have received a copy of the GNU General Public License version
       
    16  * 2 along with this work; if not, write to the Free Software Foundation,
       
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    18  *
       
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    20  * or visit www.oracle.com if you need additional information or have any
       
    21  * questions.
       
    22  */
       
    23 
       
    24 package org.reactivestreams.tck.flow.support;
       
    25 
       
    26 /**
       
    27  * Internal TCK use only.
       
    28  * Add / Remove tests for PublisherVerification here to make sure that they arre added/removed in the other places.
       
    29  */
       
    30 public interface PublisherVerificationRules {
       
    31   /**
       
    32    * Validates that the override of {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()}
       
    33    * returns a non-negative value.
       
    34    */
       
    35   void required_validate_maxElementsFromPublisher() throws Exception;
       
    36   /**
       
    37    * Validates that the override of {@link org.reactivestreams.tck.PublisherVerification#boundedDepthOfOnNextAndRequestRecursion()}
       
    38    * returns a positive value.
       
    39    */
       
    40   void required_validate_boundedDepthOfOnNextAndRequestRecursion() throws Exception;
       
    41   /**
       
    42    * Asks for a {@code Publisher} that should emit exactly one item and complete (both within a
       
    43    * timeout specified by {@link org.reactivestreams.tck.TestEnvironment#defaultTimeoutMillis()})
       
    44    * in response to a request(1).
       
    45    * <p>
       
    46    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} returns zero.
       
    47    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
    48    * <ul>
       
    49    * <li>the {@code Publisher.subscribe(Subscriber)} method has actual implementation,</li>
       
    50    * <li>in the {@code Publisher.subscribe(Subscriber)} method, if there is an upstream {@code Publisher},
       
    51    * that {@code Publisher} is actually subscribed to,</li>
       
    52    * <li>if the {@code Publisher} is part of a chain, all elements actually issue a {@code request()} call
       
    53    * in response to the test subscriber or by default to their upstream,</li>
       
    54    * <li>in the {@code Publisher.subscribe(Subscriber)} method, the {@code Subscriber.onSubscribe} is called
       
    55    * as part of the preparation process (usually before subscribing to other {@code Publisher}s),</li>
       
    56    * <li>if the {@code Publisher} implementation works for a consumer that calls {@code request(1)},</li>
       
    57    * <li>if the {@code Publisher} implementation is able to emit an {@code onComplete} without requests,</li>
       
    58    * <li>that the {@code Publisher} implementation does not emit more than the allowed elements (exactly one).</li>
       
    59    * </ul>
       
    60    */
       
    61   void required_createPublisher1MustProduceAStreamOfExactly1Element() throws Throwable;
       
    62   /**
       
    63    * Asks for a {@code Publisher} that should emit exactly three items and complete (all within a
       
    64    * timeout specified by {@link org.reactivestreams.tck.TestEnvironment#defaultTimeoutMillis()}).
       
    65    * <p>
       
    66    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
    67    * <p>
       
    68    * The tests requests one-by-one and verifies each single response item arrives in time.
       
    69    * <p>
       
    70    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
    71    * <ul>
       
    72    * <li>the {@code Publisher.subscribe(Subscriber)} method has actual implementation,</li>
       
    73    * <li>in the {@code Publisher.subscribe(Subscriber)} method, if there is an upstream {@code Publisher},
       
    74    * that {@code Publisher} is actually subscribed to,</li>
       
    75    * <li>if the {@code Publisher} is part of a chain, all elements actually issue a {@code request()} call
       
    76    * in response to the test subscriber or by default to their upstream,</li>
       
    77    * <li>in the {@code Publisher.subscribe(Subscriber)} method, the {@code Subscriber.onSubscribe} is called
       
    78    * as part of the preparation process (usually before subscribing to other {@code Publisher}s),</li>
       
    79    * <li>if the {@code Publisher} implementation works for a subscriber that calls {@code request(1)} after consuming an item,</li>
       
    80    * <li>if the {@code Publisher} implementation is able to emit an {@code onComplete} without requests.</li>
       
    81    * </ul>
       
    82    */
       
    83   void required_createPublisher3MustProduceAStreamOfExactly3Elements() throws Throwable;
       
    84   /**
       
    85    * Asks for a {@code Publisher} that responds to a request pattern of 0 (not requesting upfront), 1, 1 and 2
       
    86    * in a timely manner.
       
    87    * <p>
       
    88    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.1'>1.1</a>
       
    89    * <p>
       
    90    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 5.
       
    91    * <p>
       
    92    * This test ensures that the {@code Publisher} implementation correctly responds to {@code request()} calls that in
       
    93    * total are less than the number of elements this {@code Publisher} could emit (thus the completion event won't be emitted).
       
    94    * <p>
       
    95    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
    96    * <ul>
       
    97    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
    98    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
    99    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   100    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   101    * </ul>
       
   102    */
       
   103   void required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable;
       
   104   /**
       
   105    * Asks for a short {@code Publisher} and verifies that requesting once and with more than the length (but bounded) results in the
       
   106    * correct number of items to be emitted (i.e., length 3 and request 10) followed by an {@code onComplete} signal.
       
   107    * <p>
       
   108    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.2'>1.2</a>
       
   109    * <p>
       
   110    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   111    * <p>
       
   112    * This test ensures that the {@code Publisher} implementation can deal with larger requests than the number of items it can produce.
       
   113    * <p>
       
   114    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   115    * <ul>
       
   116    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   117    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass.</li>
       
   118    * </ul>
       
   119    */
       
   120   void required_spec102_maySignalLessThanRequestedAndTerminateSubscription() throws Throwable;
       
   121   /**
       
   122    * Asks for a short {@code Publisher} (i.e., length 10), repeatedly subscribes to this {@code Publisher}, requests items
       
   123    * one by one and verifies the {@code Publisher} calls the {@code onXXX} methods non-overlappingly.
       
   124    * <p>
       
   125    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.3'>1.3</a>
       
   126    * <p>
       
   127    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10.
       
   128    * <p>
       
   129    * Note that this test is probabilistic, that is, may not capture any concurrent invocation in a {code Publisher} implementation.
       
   130    * Note also that this test is sensitive to cases when a {@code request()} call in {@code onSubscribe()} triggers an asynchronous
       
   131    * call to the other {@code onXXX} methods. In contrast, the test allows synchronous call chain of
       
   132    * {@code onSubscribe -> request -> onNext}.
       
   133    * <p>
       
   134    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   135    * <ul>
       
   136    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   137    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   138    * <li>if a {@code request()} call from {@code onSubscribe()} could trigger an asynchronous call to {@code onNext()} and if so, make sure
       
   139    * such {@code request()} calls are deferred until the call to {@code onSubscribe()} returns normally.</li>
       
   140    * </ul>
       
   141    */
       
   142   void stochastic_spec103_mustSignalOnMethodsSequentially() throws Throwable;
       
   143   /**
       
   144    * Asks for an error {@code Publisher} that should call {@code onSubscribe} exactly once
       
   145    * followed by a single call to {@code onError()} without receiving any requests and otherwise
       
   146    * not throwing any exception.
       
   147    * <p>
       
   148    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.4'>1.4</a>
       
   149    * <p>
       
   150    * The test is not executed if {@code PublisherVerification.createErrorPublisher()} returns null.
       
   151    * <p>
       
   152    * If this test fails, the following could be checked within the error {@code Publisher} implementation:
       
   153    * <ul>
       
   154    * <li>the {@code Publisher.subscribe(Subscriber)} method has actual implementation,</li>
       
   155    * <li>in the {@code Publisher.subscribe(Subscriber)} method, if there is an upstream {@code Publisher},
       
   156    * that {@code Publisher} is actually subscribed to,</li>
       
   157    * <li>if the {@code Publisher} implementation does signal an {@code onSubscribe} before signalling {@code onError},</li>
       
   158    * <li>if the {@code Publisher} implementation is able to emit an {@code onError} without requests,</li>
       
   159    * <li>if the {@code Publisher} is non-empty as this test requires a {@code Publisher} to signal an
       
   160    * {@code onError} eagerly.</li>
       
   161    * </ul>
       
   162    */
       
   163   void optional_spec104_mustSignalOnErrorWhenFails() throws Throwable;
       
   164   /**
       
   165    * Asks for a short {@code Publisher} (i.e., length 3) and verifies, after requesting one by one, the sequence
       
   166    * completes normally.
       
   167    * <p>
       
   168    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.5'>1.5</a>
       
   169    * <p>
       
   170    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   171    * <p>
       
   172    * Note that the tests requests 1 after the items have been received and before expecting an {@code onComplete} signal.
       
   173    * <p>
       
   174    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   175    * <ul>
       
   176    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   177    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   178    * </ul>
       
   179    */
       
   180   void required_spec105_mustSignalOnCompleteWhenFiniteStreamTerminates() throws Throwable;
       
   181   /**
       
   182    * Asks for an empty {@code Publisher} (i.e., length 0) and verifies it completes in a timely manner.
       
   183    * <p>
       
   184    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.5'>1.5</a>
       
   185    * <p>
       
   186    * Note that the tests requests 1 before expecting an {@code onComplete} signal.
       
   187    * <p>
       
   188    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   189    * <ul>
       
   190    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   191    * <li>if the {@code Publisher} is non-empty as this test requires a {@code Publisher} without items.</li>
       
   192    * </ul>
       
   193    */
       
   194   void optional_spec105_emptyStreamMustTerminateBySignallingOnComplete() throws Throwable;
       
   195   /**
       
   196    * Currently, this test is skipped because it is unclear this rule can be effectively checked
       
   197    * on a {@code Publisher} instance without looking into or hooking into the implementation of it.
       
   198    * <p>
       
   199    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.6'>1.6</a>
       
   200    */
       
   201   void untested_spec106_mustConsiderSubscriptionCancelledAfterOnErrorOrOnCompleteHasBeenCalled() throws Throwable;
       
   202   /**
       
   203    * Asks for a single-element {@code Publisher} and checks if requesting after the terminal event doesn't
       
   204    * lead to more items or terminal signals to be emitted.
       
   205    * <p>
       
   206    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.7'>1.7</a>
       
   207    * <p>
       
   208    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1.
       
   209    * <p>
       
   210    * The tests requests more items than the expected {@code Publisher} length upfront and some more items after its completion.
       
   211    * <p>
       
   212    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   213    * <ul>
       
   214    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   215    * <li>the indication for the terminal state is properly persisted and a request call can't trigger emission of more items or another
       
   216    * terminal signal.</li>
       
   217    * </ul>
       
   218    */
       
   219   void required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled() throws Throwable;
       
   220   /**
       
   221    * Currently, this test is skipped, although it is possible to validate an error {@code Publisher} along
       
   222    * the same lines as {@link #required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled()}.
       
   223    * <p>
       
   224    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.7'>1.7</a>
       
   225    */
       
   226   void untested_spec107_mustNotEmitFurtherSignalsOnceOnErrorHasBeenSignalled() throws Throwable;
       
   227   /**
       
   228    * Currently, this test is skipped because there was no agreement on how to verify its "eventually" requirement.
       
   229    * <p>
       
   230    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.8'>1.8</a>
       
   231    */
       
   232   void untested_spec108_possiblyCanceledSubscriptionShouldNotReceiveOnErrorOrOnCompleteSignals() throws Throwable;
       
   233   /**
       
   234    * Asks for an empty {@code Publisher} and verifies if {@code onSubscribe} signal was emitted before
       
   235    * any other {@code onNext}, {@code onError} or {@code onComplete} signal.
       
   236    * <p>
       
   237    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.9'>1.9</a>
       
   238    * <p>
       
   239    * Note that this test doesn't request anything, however, an {@code onNext} is not considered as a failure.
       
   240    * <p>
       
   241    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   242    * <ul>
       
   243    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   244    * <li>the {@code Publisher.subscribe(Subscriber)} method has actual implementation,</li>
       
   245    * <li>in the {@code Publisher.subscribe(Subscriber)} method, if there is an upstream {@code Publisher},
       
   246    * that {@code Publisher} is actually subscribed to,</li>
       
   247    * <li>in the {@code Publisher.subscribe(Subscriber)} method, the {@code Subscriber.onSubscribe} is called
       
   248    * as part of the preparation process (usually before subscribing to other {@code Publisher}s).</li>
       
   249    * </ul>
       
   250    */
       
   251   void required_spec109_mustIssueOnSubscribeForNonNullSubscriber() throws Throwable;
       
   252   /**
       
   253    * Currently, this test is skipped because there is no common agreement on what is to be considered a fatal exception and
       
   254    * besides, {@code Publisher.subscribe} is only allowed throw a {@code NullPointerException} and any other
       
   255    * exception would require looking into or hooking into the implementation of the {@code Publisher}.
       
   256    * <p>
       
   257    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.9'>1.9</a>
       
   258    */
       
   259   void untested_spec109_subscribeShouldNotThrowNonFatalThrowable() throws Throwable;
       
   260   /**
       
   261    * Asks for an empty {@code Publisher} and calls {@code subscribe} on it with {@code null} that should result in
       
   262    * a {@code NullPointerException} to be thrown.
       
   263    * <p>
       
   264    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.9'>1.9</a>
       
   265    * <p>
       
   266    * If this test fails, check if the {@code subscribe()} implementation has an explicit null check (or a method dereference
       
   267    * on the {@code Subscriber}), especially if the incoming {@code Subscriber} is wrapped or stored to be used later.
       
   268    */
       
   269   void required_spec109_subscribeThrowNPEOnNullSubscriber() throws Throwable;
       
   270   /**
       
   271    * Asks for an error {@code Publisher} that should call {@code onSubscribe} exactly once
       
   272    * followed by a single call to {@code onError()} without receiving any requests.
       
   273    * <p>
       
   274    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.9'>1.9</a>
       
   275    * <p>
       
   276    * The test is not executed if {@code PublisherVerification.createErrorPublisher()} returns null.
       
   277    * <p>
       
   278    * The difference between this test and {@link #optional_spec104_mustSignalOnErrorWhenFails()} is that there is
       
   279    * no explicit verification if exceptions were thrown in addition to the regular {@code onSubscribe+onError} signal pair.
       
   280    * <p>
       
   281    * If this test fails, the following could be checked within the error {@code Publisher} implementation:
       
   282    * <ul>
       
   283    * <li>the {@code Publisher.subscribe(Subscriber)} method has actual implementation,</li>
       
   284    * <li>in the {@code Publisher.subscribe(Subscriber)} method, if there is an upstream {@code Publisher},
       
   285    * that {@code Publisher} is actually subscribed to,</li>
       
   286    * <li>if the {@code Publisher} implementation is able to emit an {@code onError} without requests,</li>
       
   287    * <li>if the {@code Publisher} is non-empty as this test expects a {@code Publisher} without items.</li>
       
   288    * </ul>
       
   289    */
       
   290   void required_spec109_mayRejectCallsToSubscribeIfPublisherIsUnableOrUnwillingToServeThemRejectionMustTriggerOnErrorAfterOnSubscribe() throws Throwable;
       
   291   /**
       
   292    * Currently, this test is skipped because enforcing rule §1.10 requires unlimited retention and reference-equal checks on
       
   293    * all incoming {@code Subscriber} which is generally infeasible, plus reusing the same {@code Subscriber} instance is
       
   294    * better detected (or ignored) inside {@code Subscriber.onSubscribe} when the method is called multiple times.
       
   295    * <p>
       
   296    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.10'>1.10</a>
       
   297    */
       
   298   void untested_spec110_rejectASubscriptionRequestIfTheSameSubscriberSubscribesTwice() throws Throwable;
       
   299   /**
       
   300    * Asks for a single-element {@code Publisher} and subscribes to it twice, without consuming with either
       
   301    * {@code Subscriber} instance
       
   302    * (i.e., no requests are issued).
       
   303    * <p>
       
   304    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.11'>1.11</a>
       
   305    * <p>
       
   306    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1.
       
   307    * <p>
       
   308    * Note that this test ignores what signals the {@code Publisher} emits. Any exception thrown through non-regular
       
   309    * means will indicate a skipped test.
       
   310    */
       
   311   void optional_spec111_maySupportMultiSubscribe() throws Throwable;
       
   312   /**
       
   313    * Asks for a single-element {@code Publisher} and subscribes to it twice.
       
   314    * Each {@code Subscriber} requests for 1 element and checks if onNext or onComplete signals was received.
       
   315    * <p>
       
   316    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.11'>1.11</a>,
       
   317    * and depends on valid implementation of rule <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.5'>1.5</a>
       
   318    * in order to verify this.
       
   319    * <p>
       
   320    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1.
       
   321    * <p>
       
   322    * Any exception thrown through non-regular means will indicate a skipped test.
       
   323    */
       
   324   void optional_spec111_registeredSubscribersMustReceiveOnNextOrOnCompleteSignals() throws Throwable;
       
   325   /**
       
   326    * Asks for a short {@code Publisher} (length 5), subscribes 3 {@code Subscriber}s to it, requests with different
       
   327    * patterns and checks if all 3 received the same events in the same order.
       
   328    * <p>
       
   329    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.11'>1.11</a>
       
   330    * <p>
       
   331    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 5.
       
   332    * <p>
       
   333    * 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).
       
   334    * <p>
       
   335    * Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of
       
   336    * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test.
       
   337    * <p>
       
   338    * Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher},
       
   339    * see the skip message for an indication of this.
       
   340    * <p>
       
   341    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   342    * <ul>
       
   343    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   344    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   345    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   346    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   347    * </ul>
       
   348    */
       
   349   void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingOneByOne() throws Throwable;
       
   350   /**
       
   351    * Asks for a short {@code Publisher} (length 3), subscribes 3 {@code Subscriber}s to it, requests more than the length items
       
   352    * upfront with each and verifies they all received the same items in the same order (but does not verify they all complete).
       
   353    * <p>
       
   354    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.11'>1.11</a>
       
   355    * <p>
       
   356    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   357    * <p>
       
   358    * Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of
       
   359    * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test.
       
   360    * <p>
       
   361    * Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher},
       
   362    * see the skip message for an indication of this.
       
   363    * <p>
       
   364    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   365    * <ul>
       
   366    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   367    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   368    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   369    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   370    * </ul>
       
   371    */
       
   372   void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfront() throws Throwable;
       
   373   /**
       
   374    * Asks for a short {@code Publisher} (length 3), subscribes 3 {@code Subscriber}s to it, requests more than the length items
       
   375    * upfront with each and verifies they all received the same items in the same order followed by an {@code onComplete} signal.
       
   376    * <p>
       
   377    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.11'>1.11</a>
       
   378    * <p>
       
   379    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   380    * <p>
       
   381    * Note that this test requires a {@code Publisher} that always emits the same signals to any {@code Subscriber}, regardless of
       
   382    * when they subscribe and how they request elements. I.e., a "live" {@code Publisher} emitting the current time would not pass this test.
       
   383    * <p>
       
   384    * Note that this test is optional and may appear skipped even if the behavior should be actually supported by the {@code Publisher},
       
   385    * see the skip message for an indication of this.
       
   386    * <p>
       
   387    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   388    * <ul>
       
   389    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   390    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   391    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   392    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   393    * </ul>
       
   394    */
       
   395   void optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfrontAndCompleteAsExpected() throws Throwable;
       
   396   /**
       
   397    * Asks for a short {@code Publisher} (length 6), requests several times from within {@code onSubscribe} and then requests
       
   398    * one-by-one from {@code onNext}.
       
   399    * <p>
       
   400    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.2'>3.2</a>
       
   401    * <p>
       
   402    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 6.
       
   403    * <p>
       
   404    * The request pattern is 3 x 1 from within {@code onSubscribe} and one from within each {@code onNext} invocation.
       
   405    * <p>
       
   406    * The test consumes the {@code Publisher} but otherwise doesn't verify the {@code Publisher} completes (however, it checks
       
   407    * for errors).
       
   408    * <p>
       
   409    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   410    * <ul>
       
   411    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   412    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   413    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   414    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   415    * </ul>
       
   416    */
       
   417   void required_spec302_mustAllowSynchronousRequestCallsFromOnNextAndOnSubscribe() throws Throwable;
       
   418   /**
       
   419    * Asks for a {@code Publisher} with length equal to the value returned by {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()} plus 1,
       
   420    * calls {@code request(1)} externally and then from within {@code onNext} and checks if the stack depth did not increase beyond the
       
   421    * amount permitted by {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()}.
       
   422    * <p>
       
   423    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.3'>3.3</a>
       
   424    * <p>
       
   425    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than
       
   426    * {@link #required_validate_boundedDepthOfOnNextAndRequestRecursion()} plus 1.
       
   427    * <p>
       
   428    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   429    * <ul>
       
   430    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   431    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   432    * <li>the implementation doesn't allow unbounded recursion when {@code request()} is called from within {@code onNext}, i.e., the lack of
       
   433    * 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}).
       
   434    * </ul>
       
   435    */
       
   436   void required_spec303_mustNotAllowUnboundedRecursion() throws Throwable;
       
   437   /**
       
   438    * Currently, this test is skipped because a {@code request} could enter into a synchronous computation via {@code onNext}
       
   439    * legally and otherwise there is no common agreement how to detect such heavy computation reliably.
       
   440    * <p>
       
   441    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.4'>3.4</a>
       
   442    */
       
   443   void untested_spec304_requestShouldNotPerformHeavyComputations() throws Exception;
       
   444   /**
       
   445    * Currently, this test is skipped because there is no reliable agreed upon way to detect a heavy computation.
       
   446    * <p>
       
   447    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.5'>3.5</a>
       
   448    */
       
   449   void untested_spec305_cancelMustNotSynchronouslyPerformHeavyComputation() throws Exception;
       
   450   /**
       
   451    * Asks for a short {@code Publisher} (length 3) and verifies that cancelling without requesting anything, then requesting
       
   452    * items should result in no signals to be emitted.
       
   453    * <p>
       
   454    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.6'>3.6</a>
       
   455    * <p>
       
   456    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   457    * <p>
       
   458    * The post-cancellation request pattern is (1, 1, 1).
       
   459    * <p>
       
   460    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   461    * <ul>
       
   462    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   463    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   464    * <li>the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.</li>
       
   465    * </ul>
       
   466    */
       
   467   void required_spec306_afterSubscriptionIsCancelledRequestMustBeNops() throws Throwable;
       
   468   /**
       
   469    * Asks for a single-element {@code Publisher} and verifies that without requesting anything, cancelling the sequence
       
   470    * multiple times should result in no signals to be emitted and should result in an thrown exception.
       
   471    * <p>
       
   472    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.7'>3.7</a>
       
   473    * <p>
       
   474    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 1.
       
   475    * <p>
       
   476    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   477    * <ul>
       
   478    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   479    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   480    * <li>the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.</li>
       
   481    * </ul>
       
   482    */
       
   483   void required_spec307_afterSubscriptionIsCancelledAdditionalCancelationsMustBeNops() throws Throwable;
       
   484   /**
       
   485    * Asks for a short {@code Publisher} (length 10) and issues a {@code request(0)} which should trigger an {@code onError} call
       
   486    * with an {@code IllegalArgumentException}.
       
   487    * <p>
       
   488    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.9'>3.9</a>
       
   489    * <p>
       
   490    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10.
       
   491    * <p>
       
   492    * Note that this test expects the {@code IllegalArgumentException} being signalled through {@code onError}, not by
       
   493    * throwing from {@code request()} (which is also forbidden) or signalling the error by any other means (i.e., through the
       
   494    * {@code Thread.currentThread().getUncaughtExceptionHandler()} for example).
       
   495    * <p>
       
   496    * Note also that requesting and emission may happen concurrently and honoring this rule may require extra coordination within
       
   497    * the {@code Publisher}.
       
   498    * <p>
       
   499    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   500    * <ul>
       
   501    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   502    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   503    * <li>the {@code Publisher} can emit an {@code onError} in this particular case, even if there was no prior and legal
       
   504    * {@code request} call and even if the {@code Publisher} would like to emit items first before emitting an {@code onError}
       
   505    * in general.
       
   506    * </ul>
       
   507    */
       
   508   void required_spec309_requestZeroMustSignalIllegalArgumentException() throws Throwable;
       
   509   /**
       
   510    * Asks for a short {@code Publisher} (length 10) and issues a random, negative {@code request()} call which should
       
   511    * trigger an {@code onError} call with an {@code IllegalArgumentException}.
       
   512    * <p>
       
   513    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.9'>3.9</a>
       
   514    * <p>
       
   515    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10.
       
   516    * <p>
       
   517    * Note that this test expects the {@code IllegalArgumentException} being signalled through {@code onError}, not by
       
   518    * throwing from {@code request()} (which is also forbidden) or signalling the error by any other means (i.e., through the
       
   519    * {@code Thread.currentThread().getUncaughtExceptionHandler()} for example).
       
   520    * <p>
       
   521    * Note also that requesting and emission may happen concurrently and honoring this rule may require extra coordination within
       
   522    * the {@code Publisher}.
       
   523    * <p>
       
   524    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   525    * <ul>
       
   526    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   527    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   528    * <li>the {@code Publisher} can emit an {@code onError} in this particular case, even if there was no prior and legal
       
   529    * {@code request} call and even if the {@code Publisher} would like to emit items first before emitting an {@code onError}
       
   530    * in general.
       
   531    * </ul>
       
   532    */
       
   533   void required_spec309_requestNegativeNumberMustSignalIllegalArgumentException() throws Throwable;
       
   534   /**
       
   535    * Asks for a short {@code Publisher} (length 10) and issues a random, negative {@code request()} call which should
       
   536    * trigger an {@code onError} call with an {@code IllegalArgumentException}.
       
   537    * <p>
       
   538    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.9'>3.9</a>
       
   539    * <p>
       
   540    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 10.
       
   541    * <p>
       
   542    * Note that this test expects the {@code IllegalArgumentException} being signalled through {@code onError}, not by
       
   543    * throwing from {@code request()} (which is also forbidden) or signalling the error by any other means (i.e., through the
       
   544    * {@code Thread.currentThread().getUncaughtExceptionHandler()} for example).
       
   545    * <p>
       
   546    * Note also that requesting and emission may happen concurrently and honoring this rule may require extra coordination within
       
   547    * the {@code Publisher}.
       
   548    * <p>
       
   549    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   550    * <ul>
       
   551    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   552    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   553    * <li>the {@code Publisher} can emit an {@code onError} in this particular case, even if there was no prior and legal
       
   554    * {@code request} call and even if the {@code Publisher} would like to emit items first before emitting an {@code onError}
       
   555    * in general.
       
   556    * </ul>
       
   557    */
       
   558   void optional_spec309_requestNegativeNumberMaySignalIllegalArgumentExceptionWithSpecificMessage() throws Throwable;
       
   559   /**
       
   560    * Asks for a short {@code Publisher} (length 20), requests some items (less than the length), consumes one item then
       
   561    * cancels the sequence and verifies the publisher emitted at most the requested amount and stopped emitting (or terminated).
       
   562    * <p>
       
   563    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.12'>3.12</a>
       
   564    * <p>
       
   565    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 20.
       
   566    * <p>
       
   567    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   568    * <ul>
       
   569    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   570    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   571    * <li>the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.</li>
       
   572    * </ul>
       
   573    */
       
   574   void required_spec312_cancelMustMakeThePublisherToEventuallyStopSignaling() throws Throwable;
       
   575   /**
       
   576    * Asks for a short {@code Publisher} (length 3) requests and consumes one element from it, cancels the {@code Subscription}
       
   577    * , calls {@code System.gc()} and then checks if all references to the test {@code Subscriber} has been dropped (by checking
       
   578    * the {@code WeakReference} has been emptied).
       
   579    * <p>
       
   580    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.13'>3.13</a>
       
   581    * <p>
       
   582    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   583    * <p>
       
   584    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   585    * <ul>
       
   586    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   587    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   588    * <li>the cancellation indicator flag is properly persisted (may require volatile) and checked as part of the signal emission process.</li>
       
   589    * <li>the {@code Publisher} stores the {@code Subscriber} reference somewhere which is then not cleaned up when the {@code Subscriber} is cancelled.
       
   590    * Note that this may happen on many code paths in a {@code Publisher}, for example in an emission loop that terminates because of the
       
   591    * {@code cancel} signal or because reaching a terminal state. Note also that eagerly nulling {@code Subscriber} references may not be necessary
       
   592    * for this test to pass in case there is a self-contained chain of them (i.e., {@code Publisher.subscribe()} creates a chain of fresh
       
   593    * {@code Subscriber} instances where each of them only references their downstream {@code Subscriber} thus the chain can get GC'd
       
   594    * when the reference to the final {@code Subscriber} is dropped).
       
   595    * </ul>
       
   596    */
       
   597   void required_spec313_cancelMustMakeThePublisherEventuallyDropAllReferencesToTheSubscriber() throws Throwable;
       
   598   /**
       
   599    * Asks for a short {@code Publisher} (length 3) and requests {@code Long.MAX_VALUE} from it, verifying that the
       
   600    * {@code Publisher} emits all of its items and completes normally
       
   601    * and does not keep spinning attempting to fulfill the {@code Long.MAX_VALUE} demand by some means.
       
   602    * <p>
       
   603    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.17'>3.17</a>
       
   604    * <p>
       
   605    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   606    * <p>
       
   607    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   608    * <ul>
       
   609    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   610    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   611    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   612    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   613    * </ul>
       
   614    */
       
   615   void required_spec317_mustSupportAPendingElementCountUpToLongMaxValue() throws Throwable;
       
   616   /**
       
   617    * Asks for a short {@code Publisher} (length 3) and requests {@code Long.MAX_VALUE} from it in total (split across
       
   618    * two {@code Long.MAX_VALUE / 2} and one {@code request(1)}), verifying that the
       
   619    * {@code Publisher} emits all of its items and completes normally.
       
   620    * <p>
       
   621    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.17'>3.17</a>
       
   622    * <p>
       
   623    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than 3.
       
   624    * <p>
       
   625    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   626    * <ul>
       
   627    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   628    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   629    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   630    * <li>if the {@code Publisher} implements adding individual request amounts together properly (not overflowing into zero or negative pending request amounts)
       
   631    * or not properly deducing the number of emitted items from the pending amount,</li>
       
   632    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   633    * </ul>
       
   634    */
       
   635   void required_spec317_mustSupportACumulativePendingElementCountUpToLongMaxValue() throws Throwable;
       
   636   /**
       
   637    * Asks for a very long {@code Publisher} (up to {@code Integer.MAX_VALUE}), requests {@code Long.MAX_VALUE - 1} after
       
   638    * each received item and expects no failure due to a potential overflow in the pending emission count while consuming
       
   639    * 10 items and cancelling the sequence.
       
   640    * <p>
       
   641    * <b>Verifies rule:</b> <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.17'>3.17</a>
       
   642    * <p>
       
   643    * The test is not executed if {@link org.reactivestreams.tck.PublisherVerification#maxElementsFromPublisher()} is less than {@code Integer.MAX_VALUE}.
       
   644    * <p>
       
   645    * The request pattern is one {@code request(1)} upfront and ten {@code request(Long.MAX_VALUE - 1)} after.
       
   646    * <p>
       
   647    * If this test fails, the following could be checked within the {@code Publisher} implementation:
       
   648    * <ul>
       
   649    * <li>the {@code TestEnvironment} has large enough timeout specified in case the {@code Publisher} has some time-delay behavior,</li>
       
   650    * <li>make sure the {@link #required_createPublisher1MustProduceAStreamOfExactly1Element()} and {@link #required_createPublisher3MustProduceAStreamOfExactly3Elements()} tests pass,</li>
       
   651    * <li>if the {@code Publisher} implementation considers the cumulative request amount it receives,</li>
       
   652    * <li>if the {@code Publisher} implements adding individual request amounts together properly (not overflowing into zero or negative pending request amounts)
       
   653    * or not properly deducing the number of emitted items from the pending amount,</li>
       
   654    * <li>if the {@code Publisher} doesn't lose any {@code request()} signal and the state transition from idle -&gt; emitting or emitting -&gt; keep emitting works properly.</li>
       
   655    * </ul>
       
   656    */
       
   657   void required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue() throws Throwable;
       
   658 }