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

@ -3242,7 +3242,8 @@ mod tests {
"server is forbidding connections"
)))
} else {
let (client_conn, server_conn, kill_conn) = Connection::in_memory();
let (client_conn, server_conn, kill_conn) =
Connection::in_memory(cx.background());
connection_killers.lock().insert(user_id, kill_conn);
cx.background()
.spawn(server.handle_connection(