mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
WIP: Start on test to ensure incoming calls cancel upon recipient disconnection
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
2c4f003897
commit
6146923dbb
1 changed files with 17 additions and 0 deletions
|
@ -533,6 +533,23 @@ async fn test_calls_on_multiple_connections(
|
|||
deterministic.advance_clock(rpc::RECEIVE_TIMEOUT);
|
||||
assert!(incoming_call_b1.next().await.unwrap().is_none());
|
||||
assert!(incoming_call_b2.next().await.unwrap().is_none());
|
||||
|
||||
// User A reconnects automatically, then calls user B again.
|
||||
active_call_a
|
||||
.update(cx_a, |call, cx| {
|
||||
call.invite(client_b1.user_id().unwrap(), None, cx)
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
deterministic.run_until_parked();
|
||||
assert!(incoming_call_b1.next().await.unwrap().is_some());
|
||||
assert!(incoming_call_b2.next().await.unwrap().is_some());
|
||||
|
||||
// User B disconnects all clients, causing user A to no longer see a pending call for them.
|
||||
println!("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
server.disconnect_client(client_b1.current_user_id(cx_b1));
|
||||
deterministic.advance_clock(rpc::RECEIVE_TIMEOUT);
|
||||
active_call_a.read_with(cx_a, |call, _| assert!(call.room().is_none()));
|
||||
}
|
||||
|
||||
#[gpui::test(iterations = 10)]
|
||||
|
|
Loading…
Reference in a new issue