VirtualTimeScheduler
's present time.VirtualTimeScheduler
's clock forward by a specified amount of time.VirtualTimeScheduler
's clock to a particular moment in time.n
.Context
.AssertionError
.AssertionError
.AssertionError
.AssertionError
.AssertionError
.AssertionError
.StepVerifier
check of request amount
being too low.completion
of this publisher.AssertionError
s thrown by the consumer will be rethrown during verification.StepVerifier.Step.recordWith(java.util.function.Supplier<? extends java.util.Collection<T>>)
, end it and verify
it by applying the given consumer.Subscription
and consume with the given consumer.Context
contains the given value associated
to the given key.TestPublisher
.VirtualTimeScheduler
without enabling it.StepVerifier
in an uncontrolled environment:
StepVerifier.Step.thenAwait()
will block in real time.StepVerifier
in an uncontrolled environment:
StepVerifier.Step.thenAwait()
will block in real time.StepVerifier
in an uncontrolled environment:
StepVerifier.Step.thenAwait()
will block in real time.StepVerifier
that can be tuned
using the various available non-getter methods (which can be chained).TestPublisher
, which can be subscribed to by multiple
subscribers.noncompliant
hot TestPublisher
with a given set of reactive streams spec violations that will be overlooked.StepVerifier.verify()
) is "no timeout".PublisherProbe
of which PublisherProbe.flux()
and PublisherProbe.mono()
versions will simply complete, capturing subscription, cancellation and request
events around them.error
signal to the subscribers.Subscription
step, a Context
has been
propagated.Consumer
.Publisher
to run with Reactor Fusion flow
optimization.Publisher
to run the requested Reactor Fusion mode
from any of these modes :
Fuseable.NONE
, Fuseable.SYNC
, Fuseable.ASYNC
,
Fuseable.ANY
, Fuseable.THREAD_BARRIER
.Publisher
to run with Reactor Fusion flow
optimization.count
elements, starting from the previous
expectation or onSubscribe.Iterable
until its
iterator depletes.Context
was propagated after the Subscription
phase, which usually indicates that the sequence under test doesn't contain
Reactor operators (i.e.Duration
.Duration
.Publisher
to NOT run with Reactor Fusion flow
optimization.StepVerifier.Step.recordWith(java.util.function.Supplier<? extends java.util.Collection<T>>)
, end it and verify
it by ensuring the provided predicate matches.Subscription
.Subscription
and evaluate with the given predicate.Flux
version of the probe.TestPublisher
to a Flux
.VirtualTimeScheduler
assigned in Schedulers
VirtualTimeScheduler
to all Schedulers.Factory
factories.VirtualTimeScheduler
to the relevant
Schedulers.Factory
factories, depending on how it was created (see
VirtualTimeScheduler.create()
and VirtualTimeScheduler.create()
).discard
hook, in any order.discard
hook.discard
hook,
in any order, and that no other elements were dropped.Hooks.onNextDropped(Consumer)
hook, in any order.Hooks.onNextDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook, and check that the collection of
errors matches a predicate.Hooks.onErrorDropped(Consumer)
hook, and assert them as a collection.Hooks.onErrorDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.Hooks.onNextDropped(Consumer)
hook, in any order, and that no
other elements were dropped.Context
contains a value for the given key.discard
hook.Hooks.onNextDropped(Consumer)
hook.Hooks.onErrorDropped(Consumer)
hook.onOperatorError
hook
exactly once and the error matches the given predicate.onOperatorError
hook
exactly once and the error is of the given type.onOperatorError
hook
at least once.onOperatorError
hook
exactly n times.onOperatorError
hook
once or more, and check that the collection of errors and their optionally
associated data matches a predicate.onOperatorError
hook
once or more, and assert the errors and optionally associated data as a collection.onOperatorError
hook
exactly once and the error has the exact provided message.onOperatorError
hook
exactly once, with the error message containing the provided string.Context
is of the given size.StepVerifier
should request initially.VirtualTimeScheduler
currently used by the
Schedulers
factory (ie it has been enabled
),
false otherwise (ie it has been reset
).Mono
version of the probe.TestPublisher
to a Mono
.onNext
signal to the subscribers.onNext
signals to the subscribers.PublisherProbe
out of a Publisher
, ensuring that its
PublisherProbe.flux()
and PublisherProbe.mono()
versions will propagate signals from this
publisher while capturing subscription, cancellation and request events around it.Runnable
as much as possible
to test race conditions.Runnable
as much as possible
to test race conditions.Publishers
.Schedulers
.Subscriber.onNext(Object)
values in
the supplied Collection
.Schedulers
factories.StepVerifier.verify()
timeout to the "unlimited" default.StepVerifier
.VirtualTimeScheduler
to the relevant
Schedulers.Factory
factories, depending on how it was created (see
VirtualTimeScheduler.create()
and VirtualTimeScheduler.create()
).StepVerifier.verify()
timeout for all StepVerifier
created through the
factory methods (StepVerifier.create(Publisher)
, StepVerifier.withVirtualTime(Supplier)
, etc.).StepVerifier
provides a declarative way of creating a verifiable script for
an async Publisher
sequence, by expressing expectations about the events that
will happen upon subscription.Context
propagated during the Subscription
phase.Subscription
as
first signal.StepVerifier
, including the initial request amount,
VirtualTimeScheduler
supplier and toggles for some checks.Logger
that writes to ByteArrayOutputStream
and allows retrieval of
the logs via TestLogger.getErrContent()
and TestLogger.getOutContent()
.Publisher
that you can directly manipulate, triggering
onNext
, onComplete
and
onError
events, for testing purposes.TestPublisher
.StepVerifier.ContextExpectations
as a
StepVerifier
expectation, and return the current StepVerifier.Step
in order
to build further sequence expectations and ultimately verify
the sequence.Duration
.Publisher
.verification
, expecting a completion signal
as terminal event.verification
, expecting an unspecified error
as terminal event.verification
, expecting an error of the specified
type as terminal event.verification
, expecting an error that matches
the given predicate as terminal event.verification
, expecting an error with the
specified message as terminal event.verification
, expecting an error as terminal event
which gets asserted via assertion(s) provided as a Consumer
.Verifies
the signals received by this subscriber, then exposes
various assertion methods
on the final state.Verifies
the signals received by this subscriber, then exposes
various assertion methods
on the final state.Scheduler
that uses a virtual clock, allowing to manipulate time
(eg.VirtualTimeScheduler
, which is mandatory for a
StepVerifier
to work with virtual time.Context
to be propagated by the StepVerifier
when it
subscribes to the sequence under test.StepVerifier
in a controlled environment using
VirtualTimeScheduler
to manipulate a virtual clock via
StepVerifier.Step.thenAwait()
.StepVerifier
in a controlled environment using
VirtualTimeScheduler
to manipulate a virtual clock via
StepVerifier.Step.thenAwait()
.StepVerifier
in a controlled environment using
a user-provided VirtualTimeScheduler
to manipulate a virtual clock via
StepVerifier.Step.thenAwait()
.StepVerifier
in a controlled environment using
a user-provided VirtualTimeScheduler
to manipulate a virtual clock via
StepVerifier.Step.thenAwait()
.