pub struct MultiClientPresenceTest { /* private fields */ }Expand description
Multi-client test with automatic presence join/leave.
Each client automatically joins on setup with display names client_0,
client_1, etc. All clients are cleaned up on test completion.
§Example
ⓘ
MultiClientPresenceTest::with_clients(2)
.await
.run(|mut clients| async move {
// clients[0] and clients[1] are already joined
let peers = clients[1].peers().await.unwrap();
assert_eq!(peers.len(), 1);
})
.await;Implementations§
Source§impl MultiClientPresenceTest
impl MultiClientPresenceTest
Sourcepub async fn with_clients(n: usize) -> Self
pub async fn with_clients(n: usize) -> Self
Create test with N presence-aware clients.
Server logs are captured to tmp/test-logs/{test_name}_presence_{timestamp}.log.
§Panics
Panics if server fails to spawn.
Auto Trait Implementations§
impl Freeze for MultiClientPresenceTest
impl !RefUnwindSafe for MultiClientPresenceTest
impl Send for MultiClientPresenceTest
impl Sync for MultiClientPresenceTest
impl Unpin for MultiClientPresenceTest
impl UnsafeUnpin for MultiClientPresenceTest
impl !UnwindSafe for MultiClientPresenceTest
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request