File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -2047,28 +2047,6 @@ async fn test_put_contract_three_hop_returns_response(ctx: &mut TestContext) ->
20472047 )
20482048 . await ?;
20492049
2050- // CRITICAL: Force connection teardown to ensure response routing uses addresses,
2051- // not existing connections. This makes the test deterministically catch NAT routing
2052- // bugs where responses would be routed to wrong (internal) addresses.
2053- //
2054- // Without this, the test was flaky because:
2055- // - If the bidirectional UDP connection was still active, responses might arrive
2056- // via the existing connection even with wrong address routing
2057- // - If NAT state expired or connection was torn down, routing would fail
2058- //
2059- // By forcing disconnection and reconnection, we ensure the test validates
2060- // address-based routing, catching bugs like the one fixed in PR #2243.
2061- tracing:: info!( "Forcing connection teardown to validate address-based routing" ) ;
2062- client_api_a
2063- . send ( ClientRequest :: Disconnect { cause : None } )
2064- . await ?;
2065- tokio:: time:: sleep ( Duration :: from_secs ( 2 ) ) . await ;
2066-
2067- // Reconnect to peer A - if there were any pending responses that relied on
2068- // wrong address routing, they will now fail to arrive
2069- let ( stream_a, _) = connect_async ( & uri_a) . await ?;
2070- let mut client_api_a = WebApi :: start ( stream_a) ;
2071-
20722050 // Verify contract can be retrieved from peer C
20732051 let uri_c = format ! (
20742052 "ws://127.0.0.1:{}/v1/contract/command?encodingProtocol=native" ,
You can’t perform that action at this time.
0 commit comments