Enable logs in the test

This commit is contained in:
link2xt
2024-05-18 22:23:15 +00:00
parent 41f39117af
commit 7aad78e894
3 changed files with 14 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -1497,6 +1497,7 @@ dependencies = [
"serde_json",
"tokio",
"tokio-util",
"tracing-subscriber",
"yerpc",
]

View File

@@ -104,6 +104,7 @@ tokio-util = "0.7.9"
toml = "0.8"
url = "2"
uuid = { version = "1", features = ["serde", "v4"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Pin OpenSSL to 3.1 releases.
# OpenSSL 3.2 has a regression tracked at <https://github.com/openssl/openssl/issues/23376>

View File

@@ -732,6 +732,18 @@ mod tests {
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_parallel_connect() {
use tracing_subscriber::{prelude::*, EnvFilter};
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().with_writer(std::io::stderr))
// .with(DeltaLayer(ctx.clone()))
.with(
EnvFilter::builder()
.with_default_directive(tracing_subscriber::filter::LevelFilter::DEBUG.into())
.from_env_lossy(),
)
.try_init()
.ok();
let mut tcm = TestContextManager::new();
let alice = &mut tcm.alice().await;
let bob = &mut tcm.bob().await;