changeset 56806:2507757e9ef7

8232367: Update the jdk/java/net/httpclient tests to RS TCK 1.0.3 Reviewed-by: dfuchs
author chegar
date Mon, 04 Nov 2019 10:06:59 +0000
parents d58a21542c04
children 73bb9c4002cc
files test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/SubscriberWhiteboxVerification.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/SubscriberWhiteboxVerification.java	Mon Nov 04 10:58:14 2019 +0100
+++ b/test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/SubscriberWhiteboxVerification.java	Mon Nov 04 10:06:59 2019 +0000
@@ -278,8 +278,9 @@
       @Override
       public void run(WhiteboxTestStage stage) throws InterruptedException {
         stage.puppet().triggerRequest(1);
+        stage.expectRequest();
         stage.puppet().signalCancel();
-        stage.expectRequest();
+        stage.expectCancelling();
         stage.signalNext();
 
         stage.puppet().triggerRequest(1);
@@ -824,11 +825,17 @@
      * Before sending any element to the subscriber, the TCK must wait for the subscriber to request that element, and
      * must be prepared for the subscriber to only request one element at a time, it is not enough for the TCK to
      * simply invoke this method before sending elements.
+     * <p>
+     * An invocation of {@link #signalCancel()} may be coalesced into any elements that have not yet been requested,
+     * such that only a cancel signal is emitted.
      */
     void triggerRequest(long elements);
 
     /**
-     * Trigger {@code cancel()} on your {@link Subscriber}
+     * Trigger {@code cancel()} on your {@link Subscriber}.
+     * <p>
+     * An invocation of this method may be coalesced into any outstanding requests, as requested by
+     *{@link #triggerRequest(long)}, such that only a cancel signal is emitted.
      */
     void signalCancel();
   }