mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Wait on RECEIVE_TIMEOUT
in tests when testing disconnection
We were waiting for 3 seconds, but the timeout had changed in the meantime, making some iterations of the tests fail. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
44f37afa95
commit
9555b93bca
1 changed files with 2 additions and 2 deletions
|
@ -2415,7 +2415,7 @@ mod tests {
|
||||||
// Simulate connection loss for client B and ensure client A observes client B leaving the project.
|
// Simulate connection loss for client B and ensure client A observes client B leaving the project.
|
||||||
client_b.wait_for_current_user(cx_b).await;
|
client_b.wait_for_current_user(cx_b).await;
|
||||||
server.disconnect_client(client_b.current_user_id(cx_b));
|
server.disconnect_client(client_b.current_user_id(cx_b));
|
||||||
cx_a.foreground().advance_clock(Duration::from_secs(3));
|
cx_a.foreground().advance_clock(rpc::RECEIVE_TIMEOUT);
|
||||||
project_a
|
project_a
|
||||||
.condition(cx_a, |p, _| p.collaborators().len() == 0)
|
.condition(cx_a, |p, _| p.collaborators().len() == 0)
|
||||||
.await;
|
.await;
|
||||||
|
@ -4602,7 +4602,7 @@ mod tests {
|
||||||
// Disconnect client B, ensuring we can still access its cached channel data.
|
// Disconnect client B, ensuring we can still access its cached channel data.
|
||||||
server.forbid_connections();
|
server.forbid_connections();
|
||||||
server.disconnect_client(client_b.current_user_id(&cx_b));
|
server.disconnect_client(client_b.current_user_id(&cx_b));
|
||||||
cx_b.foreground().advance_clock(Duration::from_secs(3));
|
cx_b.foreground().advance_clock(rpc::RECEIVE_TIMEOUT);
|
||||||
while !matches!(
|
while !matches!(
|
||||||
status_b.next().await,
|
status_b.next().await,
|
||||||
Some(client::Status::ReconnectionError { .. })
|
Some(client::Status::ReconnectionError { .. })
|
||||||
|
|
Loading…
Reference in a new issue