Test that we reuse credentials when reconnecting

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo
2021-09-14 18:30:17 -06:00
co-authored by Max Brunsfeld
parent 44a457e8b6
commit 77a4a36eb3
2 changed files with 23 additions and 11 deletions
+2
View File
@@ -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]