mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
some wip
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1405,6 +1405,7 @@ dependencies = [
|
||||
"tokio-tar",
|
||||
"tokio-util",
|
||||
"toml",
|
||||
"tracing-subscriber",
|
||||
"url",
|
||||
"uuid",
|
||||
"webpki-roots",
|
||||
|
||||
@@ -123,6 +123,7 @@ proptest = { version = "1", default-features = false, features = ["std"] }
|
||||
tempfile = { workspace = true }
|
||||
testdir = "0.9.0"
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
||||
tracing-subscriber.workspace = true
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
||||
@@ -563,6 +563,8 @@ async fn subscribe_loop(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::time::Duration;
|
||||
|
||||
use super::*;
|
||||
use crate::{
|
||||
chat::send_msg,
|
||||
@@ -741,6 +743,13 @@ mod tests {
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_can_reconnect() {
|
||||
tokio::time::timeout(Duration::from_secs(20), test_can_reconnect_impl())
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
async fn test_can_reconnect_impl() {
|
||||
tracing_subscriber::fmt::init();
|
||||
let mut tcm = TestContextManager::new();
|
||||
let alice = &mut tcm.alice().await;
|
||||
let bob = &mut tcm.bob().await;
|
||||
|
||||
Reference in New Issue
Block a user