@@ -286,7 +286,9 @@ async fn auto_connection_fails_peer_state_becomes_disconnected(
286286// Keep peer address's `was_reachable` field at false.
287287// 3) Advance the time so that the corresponding connection would be attempted; make the
288288// connection fail; check that the peer address state is now `Unreachable`.
289- // 4) Check that no further connection attempts are made.
289+ // 4) Optionally, accept an inbound connection from the peer address; expect that it doesn't
290+ // affect the current address state.
291+ // 5) Check that no further connection attempts are made.
290292#[ tracing:: instrument( skip( seed) ) ]
291293#[ rstest]
292294#[ trace]
@@ -510,7 +512,6 @@ async fn manual_connection_fails(#[case] seed: Seed, #[values(false, true)] make
510512
511513 if make_reachable {
512514 let peer_discovery_time = time_getter. get_time_getter ( ) . get_time ( ) ;
513-
514515 discover_peer ( & peer_mgr_event_sender, peer_address, true ) . await ;
515516
516517 let peer_addr_state =
@@ -609,7 +610,7 @@ async fn manual_connection_fails(#[case] seed: Seed, #[values(false, true)] make
609610// Make the connection succeed and close it immediately; check that `connections_without_activity_count`
610611// has been incremented.
611612// 3) Occasionally, make a successful incoming or manual outgoing connection without peer activity, or an unsuccessful
612- // manual outgoing one . Expect that this doesn't affect `connections_without_activity_count`.
613+ // manual outgoing connection . Expect that this doesn't affect `connections_without_activity_count`.
613614// 4) On the final iteration make the peer actually send a message. Check that `connections_without_activity_count` has
614615// been reset to zero.
615616// Note that feeler connections are not checked in this test because once a feeler connection succeeds, it won't
@@ -765,7 +766,7 @@ async fn auto_connection_without_peer_activity(
765766
766767 // An inbound or manual connection without peer activity shouldn't affect connections_without_activity_count.
767768 // Same for a failed outbound connection.
768- let extra_outboun_connection_failed = match rng. gen_range ( 0 ..4 ) {
769+ let extra_outbound_connection_failed = match rng. gen_range ( 0 ..4 ) {
769770 0 => {
770771 log:: debug!( "Accepting an extra inbound connection" ) ;
771772
@@ -816,7 +817,7 @@ async fn auto_connection_without_peer_activity(
816817 } ;
817818
818819 let expected_connections_without_activity_count = if is_last_iteration { 0 } else { i + 1 } ;
819- let expected_fail_count = if extra_outboun_connection_failed {
820+ let expected_fail_count = if extra_outbound_connection_failed {
820821 1
821822 } else {
822823 0
0 commit comments