mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
test: fix event race condition (#2729)
This commit is contained in:
@ -62,9 +62,9 @@ async fn test_session_established_with_different_capability() {
|
||||
|
||||
let handle = net.spawn();
|
||||
|
||||
let mut events = handle0.event_listener().take(2);
|
||||
handle0.add_peer(*handle1.peer_id(), handle1.local_addr());
|
||||
|
||||
let mut events = handle0.event_listener().take(2);
|
||||
while let Some(event) = events.next().await {
|
||||
match event {
|
||||
NetworkEvent::PeerAdded(peer_id) => {
|
||||
|
||||
Reference in New Issue
Block a user