mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +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-tar",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"toml",
|
"toml",
|
||||||
|
"tracing-subscriber",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
"webpki-roots",
|
"webpki-roots",
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ proptest = { version = "1", default-features = false, features = ["std"] }
|
|||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
testdir = "0.9.0"
|
testdir = "0.9.0"
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
||||||
|
tracing-subscriber.workspace = true
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
|
|||||||
@@ -563,6 +563,8 @@ async fn subscribe_loop(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
chat::send_msg,
|
chat::send_msg,
|
||||||
@@ -741,6 +743,13 @@ mod tests {
|
|||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||||
async fn test_can_reconnect() {
|
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 mut tcm = TestContextManager::new();
|
||||||
let alice = &mut tcm.alice().await;
|
let alice = &mut tcm.alice().await;
|
||||||
let bob = &mut tcm.bob().await;
|
let bob = &mut tcm.bob().await;
|
||||||
|
|||||||
Reference in New Issue
Block a user