From a0f9f7e6cebdc94c125ae8afacea5b645255075b Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 18 Dec 2023 18:33:40 -0800 Subject: [PATCH] Annotate client/server tasks in rebind_recv test --- quinn/src/tests.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/quinn/src/tests.rs b/quinn/src/tests.rs index 3436cb68d1..b2d131d467 100644 --- a/quinn/src/tests.rs +++ b/quinn/src/tests.rs @@ -635,11 +635,14 @@ async fn rebind_recv() { client.set_default_client_config(client_config); let server_config = crate::ServerConfig::with_single_cert(vec![cert.clone()], key).unwrap(); - let server = Endpoint::server( - server_config, - SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 0), - ) - .unwrap(); + let server = { + let _guard = tracing::error_span!("server").entered(); + Endpoint::server( + server_config, + SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 0), + ) + .unwrap() + }; let server_addr = server.local_addr().unwrap(); const MSG: &[u8; 5] = b"hello"; @@ -658,11 +661,14 @@ async fn rebind_recv() { stream.finish().await.unwrap(); }); - let connection = client - .connect(server_addr, "localhost") - .unwrap() - .await - .unwrap(); + let connection = { + let _guard = tracing::error_span!("client").entered(); + client + .connect(server_addr, "localhost") + .unwrap() + .await + .unwrap() + }; info!("connected"); connected_recv.notified().await; client