Skip to content

Commit 81b2b59

Browse files
committed
add some debug message to debug why restart doesn't work
seems like tracing::debug! doesn't show up. Use tracing::info! instead. REVERT THIS COMMIT ONCE IT IS NO LONGER NEEDED!
1 parent 558e373 commit 81b2b59

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

dc/s2n-quic-dc/src/stream/testing.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ pub fn bind_pair(
5656
ClientTokio<ClientProvider, NoopSubscriber>,
5757
ServerTokio<ServerProvider, NoopSubscriber>,
5858
) {
59+
tracing::info!("Binding pair!");
60+
5961
let test_subscriber = NoopSubscriber {};
6062
let client = ClientTokio::<ClientProvider, NoopSubscriber>::builder()
6163
.with_default_protocol(protocol)
@@ -176,6 +178,7 @@ pub mod dcquic {
176178
}
177179

178180
pub async fn bind(protocol: Protocol, addr: SocketAddr) -> Self {
181+
tracing::info!("Bind function called.");
179182
Self::bind_with(protocol, addr, crate::testing::Pair::default()).await
180183
}
181184

@@ -184,7 +187,9 @@ pub mod dcquic {
184187
addr: SocketAddr,
185188
pair: crate::testing::Pair,
186189
) -> Self {
190+
tracing::info!("Bind with function called.");
187191
let (client, server) = pair.build().await;
192+
tracing::info!("Server client provider successfully built.");
188193
let (client, server) = bind_pair(protocol, addr, client, server);
189194
Self {
190195
client,

dc/s2n-quic-dc/src/stream/tests/restart.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,18 @@ impl Harness {
9999

100100
async fn run_one(&self, bidirectional: bool, sleep_before_shutdown: bool) {
101101
tracing::info!(bidirectional, sleep_before_shutdown);
102+
tracing::info!("About to create context!");
102103
let context = Context::bind(self.protocol, "127.0.0.1:0".parse().unwrap()).await;
103104

105+
tracing::info!("Context created!");
106+
104107
check_stream(&context, bidirectional, sleep_before_shutdown)
105108
.instrument(info_span!("first"))
106109
.await
107110
.unwrap();
108111

112+
tracing::info!("First check stream succeeded.");
113+
109114
match self.drop {
110115
Side::Client => context.client.drop_state(),
111116
Side::Server => context.server.drop_state(),
@@ -115,9 +120,11 @@ impl Harness {
115120
}
116121
}
117122

123+
tracing::info!("Restart started!");
124+
118125
// This might fail, we don't care. At least two streams should fail before we
119126
// manage to successfully establish after dropping state.
120-
tracing::debug!(
127+
tracing::info!(
121128
"initial: {:?}",
122129
tokio::time::timeout(
123130
Duration::from_secs(2),
@@ -132,7 +139,7 @@ impl Harness {
132139

133140
// This should enqueue a recovery handshake. This used to be something we'd *wait* for, but
134141
// now we just do that in the background; this should still fail.
135-
tracing::debug!(
142+
tracing::info!(
136143
"recovery handshake: {:?}",
137144
tokio::time::timeout(
138145
Duration::from_secs(2),

dc/s2n-quic-dc/src/testing.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,14 @@ impl Pair {
249249
}
250250

251251
pub async fn build(self) -> (client::Provider, server::Provider) {
252+
tracing::info!("Build function called.");
252253
init_tracing();
253254

254255
let tls_materials_provider = TestTlsProvider {};
255256
let test_event_subscriber = NoopSubscriber {};
256257

258+
tracing::info!("Building a server provider.");
259+
257260
let server = self
258261
.server()
259262
.start(
@@ -270,6 +273,8 @@ impl Pair {
270273
.await
271274
.unwrap();
272275

276+
tracing::info!("Building a client provider.");
277+
273278
let client = self
274279
.client()
275280
.start(

0 commit comments

Comments
 (0)