diff --git a/zed/src/rpc.rs b/zed/src/rpc.rs
index bc6b41dd5f523e40e239f78465ed246b38c77bfd..8846b02f4bdfaff4adefea9e7060e6fc48480a09 100644
--- a/zed/src/rpc.rs
+++ b/zed/src/rpc.rs
@@ -581,6 +581,7 @@ mod tests {
status.recv().await,
Some(Status::Connected { .. })
));
+ assert_eq!(server.auth_count(), 1);
server.forbid_connections();
server.disconnect().await;
@@ -589,6 +590,7 @@ mod tests {
server.allow_connections();
cx.foreground().advance_clock(Duration::from_secs(10));
while !matches!(status.recv().await, Some(Status::Connected { .. })) {}
+ assert_eq!(server.auth_count(), 1); // Client reused the cached credentials when reconnecting
}
#[test]
diff --git a/zed/src/test.rs b/zed/src/test.rs
index b9948cc460f66d7891b3321dc6bb09d34b207c5a..4f28db9d2808874ee336a64ca3f0f496bd9aeaa7 100644
--- a/zed/src/test.rs
+++ b/zed/src/test.rs
@@ -21,7 +21,7 @@ use std::{
marker::PhantomData,
path::{Path, PathBuf},
sync::{
- atomic::{AtomicBool, Ordering::SeqCst},
+ atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst},
Arc,
},
};
@@ -209,6 +209,7 @@ pub struct FakeServer {
incoming: Mutex