Skip to content

Commit

Permalink
Annotate client/server tasks in rebind_recv test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Dec 19, 2023
1 parent 226441c commit 3ab75c0
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions quinn/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand Down

0 comments on commit 3ab75c0

Please sign in to comment.