Class FlowPublisherVerification<T>

java.lang.Object
org.reactivestreams.tck.PublisherVerification<T>
org.reactivestreams.tck.flow.FlowPublisherVerification<T>
All Implemented Interfaces:
PublisherVerificationRules

public abstract class FlowPublisherVerification<T> extends PublisherVerification<T>
Provides tests for verifying a Java 9+ Flow.Publisher specification rules.
See Also:
  • Constructor Details

    • FlowPublisherVerification

      public FlowPublisherVerification(TestEnvironment env, long publisherReferenceGCTimeoutMillis)
    • FlowPublisherVerification

      public FlowPublisherVerification(TestEnvironment env)
  • Method Details

    • createPublisher

      public final Publisher<T> createPublisher(long elements)
      Description copied from class: PublisherVerification
      This is the main method you must implement in your test incarnation. It must create a Publisher for a stream with exactly the given number of elements. If `elements` is `Long.MAX_VALUE` the produced stream must be infinite.
      Specified by:
      createPublisher in class PublisherVerification<T>
    • createFlowPublisher

      public abstract Flow.Publisher<T> createFlowPublisher(long elements)
      This is the main method you must implement in your test incarnation. It must create a Publisher for a stream with exactly the given number of elements. If `elements` is `Long.MAX_VALUE` the produced stream must be infinite.
    • createFailedPublisher

      public final Publisher<T> createFailedPublisher()
      Description copied from class: PublisherVerification
      By implementing this method, additional TCK tests concerning a "failed" publishers will be run. The expected behaviour of the Publisher returned by this method is hand out a subscription, followed by signalling onError on it, as specified by Rule 1.9. If you ignore these additional tests, return null from this method.
      Specified by:
      createFailedPublisher in class PublisherVerification<T>
    • createFailedFlowPublisher

      public abstract Flow.Publisher<T> createFailedFlowPublisher()
      By implementing this method, additional TCK tests concerning a "failed" publishers will be run. The expected behaviour of the Flow.Publisher returned by this method is hand out a subscription, followed by signalling onError on it, as specified by Rule 1.9. If you ignore these additional tests, return null from this method.