pub struct TestMonitoringHarness {
pub monitoring_rx: Receiver<ProcessingEvent>,
events_seen: Arc<Mutex<HashSet<String>>>,
event_history: Arc<Mutex<Vec<ProcessingEvent>>>,
}
Fields§
§monitoring_rx: Receiver<ProcessingEvent>
§events_seen: Arc<Mutex<HashSet<String>>>
§event_history: Arc<Mutex<Vec<ProcessingEvent>>>
Implementations§
source§impl TestMonitoringHarness
impl TestMonitoringHarness
pub fn new(monitoring_rx: Receiver<ProcessingEvent>) -> Self
sourcepub async fn wait_for_events(&mut self, expected_events: &[&str]) -> Result<()>
pub async fn wait_for_events(&mut self, expected_events: &[&str]) -> Result<()>
Wait for specific events to occur
sourceasync fn process_event(&self, event: &ProcessingEvent) -> Result<()>
async fn process_event(&self, event: &ProcessingEvent) -> Result<()>
Process and categorize an event
sourcepub async fn get_events_seen(&self) -> HashSet<String>
pub async fn get_events_seen(&self) -> HashSet<String>
Get all events seen so far
sourcepub async fn get_event_history(&self) -> Vec<ProcessingEvent>
pub async fn get_event_history(&self) -> Vec<ProcessingEvent>
Get full event history
sourcepub async fn has_seen_event(&self, event: &str) -> bool
pub async fn has_seen_event(&self, event: &str) -> bool
Check if a specific event has occurred
sourcepub async fn get_event_count(&self, event_prefix: &str) -> usize
pub async fn get_event_count(&self, event_prefix: &str) -> usize
Get count of specific event type
sourcepub async fn dump_history(&self)
pub async fn dump_history(&self)
Dump event history for debugging
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestMonitoringHarness
impl !RefUnwindSafe for TestMonitoringHarness
impl Send for TestMonitoringHarness
impl Sync for TestMonitoringHarness
impl Unpin for TestMonitoringHarness
impl !UnwindSafe for TestMonitoringHarness
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.