Insert random delays when sending and receiving websocket messages in tests

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-01-24 14:38:24 -08:00
parent d241ab6370
commit 2b8685c1a2
6 changed files with 53 additions and 21 deletions

View file

@ -94,7 +94,7 @@ impl FakeServer {
Err(EstablishConnectionError::Unauthorized)?
}
let (client_conn, server_conn, _) = Connection::in_memory();
let (client_conn, server_conn, _) = Connection::in_memory(cx.background());
let (connection_id, io, incoming) = self.peer.add_connection(server_conn).await;
cx.background().spawn(io).detach();
*self.incoming.lock() = Some(incoming);