Skip to content

Commit 9e3722a

Browse files
sanityclaude
andcommitted
test: add target_connections logging to debug flaky connect tests
Add detailed logging to the Connect operation's handle_response method to capture: - target_connections value at response receipt - accepted_count before and after register_acceptance - satisfied result This will help diagnose why test_gateway_reconnection occasionally times out despite receiving ConnectResponse - we need to verify whether target_connections is being set correctly to 1 for 2-node test networks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 981b3cb commit 9e3722a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/core/src/operations/connect.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,12 +671,21 @@ impl ConnectOp {
671671
tracing::info!(
672672
acceptor_pub_key = %response.acceptor.pub_key(),
673673
acceptor_loc = ?response.acceptor.location(),
674+
target_connections = state.target_connections,
675+
accepted_count = state.accepted.len(),
674676
"connect: joiner received ConnectResponse"
675677
);
676678
let result = state.register_acceptance(response, now);
677679
if let Some(new_acceptor) = &result.new_acceptor {
678680
self.recency.remove(&new_acceptor.peer);
679681
}
682+
tracing::info!(
683+
tx = %self.id,
684+
satisfied = result.satisfied,
685+
accepted_count = state.accepted.len(),
686+
target_connections = state.target_connections,
687+
"connect: register_acceptance result"
688+
);
680689
if result.satisfied {
681690
tracing::info!(
682691
tx = %self.id,

0 commit comments

Comments
 (0)