Waits until a emits event that it is connected to b and b emits an event that it is connected to a.
(a: &mut TestRunner, b: &mut TestRunner)
| 230 | // Waits until a emits event that it is connected to b |
| 231 | // and b emits an event that it is connected to a. |
| 232 | async fn wait_connected(a: &mut TestRunner, b: &mut TestRunner) { |
| 233 | while let Some(event) = a.network_events.recv().await { |
| 234 | match event { |
| 235 | NetworkEvent::PeerConnected(id) if id == b.peer_id => { |
| 236 | break; |
| 237 | } |
| 238 | _ => {} |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | #[test(tokio::test)] |
| 244 | async fn test_cancel_listen_for_identify() -> Result<()> { |
no test coverage detected