#[non_exhaustive]pub enum TestError {
Startup(Box<dyn Error + Send + Sync>),
Subscribe(Box<dyn Error + Send + Sync>),
NotQuiescent {
processed: usize,
},
NotSettled {
subscription: Option<String>,
handled: usize,
expected: usize,
deadline: Duration,
},
Connect {
broker: String,
source: Box<dyn Error + Send + Sync>,
},
Publish {
broker: String,
source: Box<dyn Error + Send + Sync>,
},
ShutDown,
Ambiguous,
NoTransport(String),
PausedClock,
Encode(String),
}Expand description
An error from the test harness.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Startup(Box<dyn Error + Send + Sync>)
An on_startup or after_startup lifecycle hook failed while starting the harness.
Subscribe(Box<dyn Error + Send + Sync>)
A subscription failed to open while starting the harness.
NotQuiescent
A reaction did not settle within the step budget (a non-terminating requeue?).
NotSettled
A live reaction did not settle before the deadline: a subscription had not handled what was published to a destination it reads, or a redelivery that fell due, or a handler was still running.
Fields
subscription: Option<String>The subscription still owed a delivery, or None when every subscription had handled
what it was owed and a handler was still running.
Connect
A broker failed to connect while starting the harness: its in-process transition, or its
connect in live mode.
Fields
Publish
A live broker refused a message the test published onto it.
Fields
ShutDown
A publish was attempted after a fail-fast failure tore the service down.
Ambiguous
An unscoped TestApp::publish is ambiguous: more than one broker is registered.
NoTransport(String)
A broker of the app has no in-process mode, so the harness cannot start the app: its type
is not registered with register_testable_broker!,
which is what a broker crate does under its testing feature.
In live mode it reports an injection through an untyped handle (the sole broker,
broker_named) onto a broker of such a type: address it with
broker instead, which publishes through the type’s default policy.
PausedClock
TestApp::start_live was called on a paused clock. A network client’s timeouts would
fire at once against it, so a live test runs on the real clock.
Encode(String)
The message failed to encode for publishing.
Trait Implementations§
Source§impl Error for TestError
impl Error for TestError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for TestError
impl !UnwindSafe for TestError
impl Freeze for TestError
impl Send for TestError
impl Sync for TestError
impl Unpin for TestError
impl UnsafeUnpin for TestError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request