pub struct WorkerTestHarness { /* private fields */ }Expand description
Worker test harness for comprehensive worker testing
Implementations§
Source§impl WorkerTestHarness
impl WorkerTestHarness
Sourcepub fn with_config(config: WorkerTestConfig) -> Self
pub fn with_config(config: WorkerTestConfig) -> Self
Create with custom configuration
Sourcepub fn config(&self) -> &WorkerTestConfig
pub fn config(&self) -> &WorkerTestConfig
Get the configuration
Sourcepub fn test_lifecycle_transitions(&self) -> Vec<WorkerTestFailure>
pub fn test_lifecycle_transitions(&self) -> Vec<WorkerTestFailure>
Test worker lifecycle transitions
Sourcepub fn verify_message_ordering(
&self,
timestamps: &[u64],
) -> Vec<WorkerTestFailure>
pub fn verify_message_ordering( &self, timestamps: &[u64], ) -> Vec<WorkerTestFailure>
Verify message ordering invariants (Lamport)
Verifies that messages maintain causal ordering.
Sourcepub fn test_ring_buffer(
&self,
config: &RingBufferTestConfig,
) -> RingBufferTestResult
pub fn test_ring_buffer( &self, config: &RingBufferTestConfig, ) -> RingBufferTestResult
Test ring buffer operations
Test SharedArrayBuffer operations
Sourcepub fn lifecycle_test_js() -> &'static str
pub fn lifecycle_test_js() -> &'static str
Generate JavaScript for worker lifecycle testing
Sourcepub fn ring_buffer_test_js(buffer_size: usize) -> String
pub fn ring_buffer_test_js(buffer_size: usize) -> String
Generate JavaScript for ring buffer testing
Generate JavaScript for shared memory testing
Sourcepub fn validate_results(&self, result: &WorkerTestResult) -> bool
pub fn validate_results(&self, result: &WorkerTestResult) -> bool
Validate worker test results against config requirements
Trait Implementations§
Source§impl Clone for WorkerTestHarness
impl Clone for WorkerTestHarness
Source§fn clone(&self) -> WorkerTestHarness
fn clone(&self) -> WorkerTestHarness
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerTestHarness
impl Debug for WorkerTestHarness
Auto Trait Implementations§
impl Freeze for WorkerTestHarness
impl RefUnwindSafe for WorkerTestHarness
impl Send for WorkerTestHarness
impl Sync for WorkerTestHarness
impl Unpin for WorkerTestHarness
impl UnsafeUnpin for WorkerTestHarness
impl UnwindSafe for WorkerTestHarness
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().