Package org.reactivestreams.tck.flow
Class IdentityFlowProcessorVerification<T>
java.lang.Object
org.reactivestreams.tck.WithHelperPublisher<T>
org.reactivestreams.tck.IdentityProcessorVerification<T>
org.reactivestreams.tck.flow.IdentityFlowProcessorVerification<T>
- All Implemented Interfaces:
PublisherVerificationRules
,SubscriberWhiteboxVerificationRules
public abstract class IdentityFlowProcessorVerification<T>
extends IdentityProcessorVerification<T>
implements SubscriberWhiteboxVerificationRules, PublisherVerificationRules
-
Nested Class Summary
Nested classes/interfaces inherited from class org.reactivestreams.tck.IdentityProcessorVerification
IdentityProcessorVerification.ManualSubscriberWithErrorCollection<A>, IdentityProcessorVerification.TestSetup
-
Constructor Summary
ConstructorsConstructorDescriptionIdentityFlowProcessorVerification
(TestEnvironment env, long publisherReferenceGCTimeoutMillis) IdentityFlowProcessorVerification
(TestEnvironment env, long publisherReferenceGCTimeoutMillis, int processorBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Flow.Publisher
<T> By implementing this method, additional TCK tests concerning a "failed" Flow publishers will be run.By implementing this method, additional TCK tests concerning a "failed" publishers will be run.protected abstract Flow.Processor
<T, T> createIdentityFlowProcessor
(int bufferSize) This is the main method you must implement in your test incarnation.createIdentityProcessor
(int bufferSize) This is the main method you must implement in your test incarnation.Methods inherited from class org.reactivestreams.tck.IdentityProcessorVerification
boundedDepthOfOnNextAndRequestRecursion, createPublisher, createSubscriber, doesCoordinatedEmission, maxElementsFromPublisher, maxSupportedSubscribers, mustImmediatelyPassOnOnErrorEventsReceivedFromItsUpstreamToItsDownstream, notVerified, notVerified, optional_spec104_mustSignalOnErrorWhenFails, optional_spec105_emptyStreamMustTerminateBySignallingOnComplete, optional_spec111_maySupportMultiSubscribe, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfront, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfrontAndCompleteAsExpected, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingOneByOne, optional_spec111_registeredSubscribersMustReceiveOnNextOrOnCompleteSignals, optional_spec309_requestNegativeNumberMaySignalIllegalArgumentExceptionWithSpecificMessage, optionalMultipleSubscribersTest, required_createPublisher1MustProduceAStreamOfExactly1Element, required_createPublisher3MustProduceAStreamOfExactly3Elements, required_exerciseWhiteboxHappyPath, required_mustRequestFromUpstreamForElementsThatHaveBeenRequestedLongAgo, required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements, required_spec102_maySignalLessThanRequestedAndTerminateSubscription, required_spec104_mustCallOnErrorOnAllItsSubscribersIfItEncountersANonRecoverableError, required_spec105_mustSignalOnCompleteWhenFiniteStreamTerminates, required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled, required_spec109_mayRejectCallsToSubscribeIfPublisherIsUnableOrUnwillingToServeThemRejectionMustTriggerOnErrorAfterOnSubscribe, required_spec109_mustIssueOnSubscribeForNonNullSubscriber, required_spec109_subscribeThrowNPEOnNullSubscriber, required_spec201_mustSignalDemandViaSubscriptionRequest, required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete, required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnError, required_spec205_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal, required_spec208_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel, required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall, required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall, required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall, required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall, required_spec213_onError_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec302_mustAllowSynchronousRequestCallsFromOnNextAndOnSubscribe, required_spec303_mustNotAllowUnboundedRecursion, required_spec306_afterSubscriptionIsCancelledRequestMustBeNops, required_spec307_afterSubscriptionIsCancelledAdditionalCancelationsMustBeNops, required_spec308_requestMustRegisterGivenNumberElementsToBeProduced, required_spec309_requestNegativeNumberMustSignalIllegalArgumentException, required_spec309_requestZeroMustSignalIllegalArgumentException, required_spec312_cancelMustMakeThePublisherToEventuallyStopSignaling, required_spec313_cancelMustMakeThePublisherEventuallyDropAllReferencesToTheSubscriber, required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue, required_spec317_mustSupportACumulativePendingElementCountUpToLongMaxValue, required_spec317_mustSupportAPendingElementCountUpToLongMaxValue, required_validate_boundedDepthOfOnNextAndRequestRecursion, required_validate_maxElementsFromPublisher, setUp, skipStochasticTests, stochastic_spec103_mustSignalOnMethodsSequentially, untested_spec106_mustConsiderSubscriptionCancelledAfterOnErrorOrOnCompleteHasBeenCalled, untested_spec107_mustNotEmitFurtherSignalsOnceOnErrorHasBeenSignalled, untested_spec108_possiblyCanceledSubscriptionShouldNotReceiveOnErrorOrOnCompleteSignals, untested_spec109_subscribeShouldNotThrowNonFatalThrowable, untested_spec110_rejectASubscriptionRequestIfTheSameSubscriberSubscribesTwice, untested_spec202_shouldAsynchronouslyDispatch, untested_spec204_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError, untested_spec206_mustCallSubscriptionCancelIfItIsNoLongerValid, untested_spec207_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization, untested_spec211_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents, untested_spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation, untested_spec213_failingOnSignalInvocation, untested_spec301_mustNotBeCalledOutsideSubscriberContext, untested_spec304_requestShouldNotPerformHeavyComputations, untested_spec305_cancelMustNotSynchronouslyPerformHeavyComputation, untested_spec310_requestMaySynchronouslyCallOnNextOnSubscriber, untested_spec311_requestMaySynchronouslyCallOnCompleteOrOnError, untested_spec314_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists, untested_spec315_cancelMustNotThrowExceptionAndMustSignalOnError, untested_spec316_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber
Methods inherited from class org.reactivestreams.tck.WithHelperPublisher
createElement, createHelperPublisher, publisherExecutorService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.reactivestreams.tck.flow.support.PublisherVerificationRules
optional_spec104_mustSignalOnErrorWhenFails, optional_spec105_emptyStreamMustTerminateBySignallingOnComplete, optional_spec111_maySupportMultiSubscribe, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfront, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingManyUpfrontAndCompleteAsExpected, optional_spec111_multicast_mustProduceTheSameElementsInTheSameSequenceToAllOfItsSubscribersWhenRequestingOneByOne, optional_spec111_registeredSubscribersMustReceiveOnNextOrOnCompleteSignals, optional_spec309_requestNegativeNumberMaySignalIllegalArgumentExceptionWithSpecificMessage, required_createPublisher1MustProduceAStreamOfExactly1Element, required_createPublisher3MustProduceAStreamOfExactly3Elements, required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements, required_spec102_maySignalLessThanRequestedAndTerminateSubscription, required_spec105_mustSignalOnCompleteWhenFiniteStreamTerminates, required_spec107_mustNotEmitFurtherSignalsOnceOnCompleteHasBeenSignalled, required_spec109_mayRejectCallsToSubscribeIfPublisherIsUnableOrUnwillingToServeThemRejectionMustTriggerOnErrorAfterOnSubscribe, required_spec109_mustIssueOnSubscribeForNonNullSubscriber, required_spec109_subscribeThrowNPEOnNullSubscriber, required_spec302_mustAllowSynchronousRequestCallsFromOnNextAndOnSubscribe, required_spec303_mustNotAllowUnboundedRecursion, required_spec306_afterSubscriptionIsCancelledRequestMustBeNops, required_spec307_afterSubscriptionIsCancelledAdditionalCancelationsMustBeNops, required_spec309_requestNegativeNumberMustSignalIllegalArgumentException, required_spec309_requestZeroMustSignalIllegalArgumentException, required_spec312_cancelMustMakeThePublisherToEventuallyStopSignaling, required_spec313_cancelMustMakeThePublisherEventuallyDropAllReferencesToTheSubscriber, required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue, required_spec317_mustSupportACumulativePendingElementCountUpToLongMaxValue, required_spec317_mustSupportAPendingElementCountUpToLongMaxValue, required_validate_boundedDepthOfOnNextAndRequestRecursion, required_validate_maxElementsFromPublisher, stochastic_spec103_mustSignalOnMethodsSequentially, untested_spec106_mustConsiderSubscriptionCancelledAfterOnErrorOrOnCompleteHasBeenCalled, untested_spec107_mustNotEmitFurtherSignalsOnceOnErrorHasBeenSignalled, untested_spec108_possiblyCanceledSubscriptionShouldNotReceiveOnErrorOrOnCompleteSignals, untested_spec109_subscribeShouldNotThrowNonFatalThrowable, untested_spec110_rejectASubscriptionRequestIfTheSameSubscriberSubscribesTwice, untested_spec304_requestShouldNotPerformHeavyComputations, untested_spec305_cancelMustNotSynchronouslyPerformHeavyComputation
Methods inherited from interface org.reactivestreams.tck.flow.support.SubscriberWhiteboxVerificationRules
required_exerciseWhiteboxHappyPath, required_spec201_mustSignalDemandViaSubscriptionRequest, required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete, required_spec203_mustNotCallMethodsOnSubscriptionOrPublisherInOnError, required_spec205_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal, required_spec208_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel, required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall, required_spec209_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall, required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithoutPrecedingRequestCall, required_spec210_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall, required_spec213_onError_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull, required_spec308_requestMustRegisterGivenNumberElementsToBeProduced, untested_spec202_shouldAsynchronouslyDispatch, untested_spec204_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError, untested_spec206_mustCallSubscriptionCancelIfItIsNoLongerValid, untested_spec207_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization, untested_spec211_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents, untested_spec212_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality_specViolation, untested_spec213_failingOnSignalInvocation, untested_spec301_mustNotBeCalledOutsideSubscriberContext, untested_spec310_requestMaySynchronouslyCallOnNextOnSubscriber, untested_spec311_requestMaySynchronouslyCallOnCompleteOrOnError, untested_spec314_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists, untested_spec315_cancelMustNotThrowExceptionAndMustSignalOnError, untested_spec316_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber
-
Constructor Details
-
IdentityFlowProcessorVerification
-
IdentityFlowProcessorVerification
public IdentityFlowProcessorVerification(TestEnvironment env, long publisherReferenceGCTimeoutMillis) -
IdentityFlowProcessorVerification
public IdentityFlowProcessorVerification(TestEnvironment env, long publisherReferenceGCTimeoutMillis, int processorBufferSize)
-
-
Method Details
-
createFailedFlowPublisher
By implementing this method, additional TCK tests concerning a "failed" Flow publishers will be run. The expected behaviour of theFlow.Publisher
returned by this method is hand out a subscription, followed by signallingonError
on it, as specified by Rule 1.9. If you want to ignore these additional tests, returnnull
from this method. -
createIdentityFlowProcessor
This is the main method you must implement in your test incarnation. It must create aFlow.Processor
, which simply forwards all stream elements from its upstream to its downstream. It must be able to internally buffer the given number of elements.- Parameters:
bufferSize
- number of elements the processor is required to be able to buffer.
-
createIdentityProcessor
Description copied from class:IdentityProcessorVerification
This is the main method you must implement in your test incarnation. It must create aProcessor
, which simply forwards all stream elements from its upstream to its downstream. It must be able to internally buffer the given number of elements.- Specified by:
createIdentityProcessor
in classIdentityProcessorVerification<T>
- Parameters:
bufferSize
- number of elements the processor is required to be able to buffer.
-
createFailedPublisher
Description copied from class:IdentityProcessorVerification
By implementing this method, additional TCK tests concerning a "failed" publishers will be run. The expected behaviour of thePublisher
returned by this method is hand out a subscription, followed by signallingonError
on it, as specified by Rule 1.9. If you want to ignore these additional tests, returnnull
from this method.- Specified by:
createFailedPublisher
in classIdentityProcessorVerification<T>
-