From 922ffbe0e6ede555e16725c7f5a60ca0eb1e71ff Mon Sep 17 00:00:00 2001 From: boqiu <82121246@qq.com> Date: Fri, 22 Nov 2024 17:28:18 +0800 Subject: [PATCH] fix ut --- node/router/src/libp2p_event_handler.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/node/router/src/libp2p_event_handler.rs b/node/router/src/libp2p_event_handler.rs index 2a02235..c225999 100644 --- a/node/router/src/libp2p_event_handler.rs +++ b/node/router/src/libp2p_event_handler.rs @@ -1230,10 +1230,7 @@ mod tests { assert_eq!(handler.peers.read().await.size(), 1); ctx.assert_status_request(alice); - assert!(matches!( - ctx.sync_recv.try_recv(), - Ok(Notification(SyncMessage::PeerConnected {peer_id})) if peer_id == alice - )); + assert!(matches!(ctx.sync_recv.try_recv(), Err(TryRecvError::Empty))); } #[tokio::test]