mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-10-26 16:00:15 +00:00
test(connector): wait for reply route in foreign network direct connect (#2738)
This commit is contained in:
@@ -2953,6 +2953,25 @@ async fn foreign_network_advertises_listeners_for_direct_connect(
|
||||
Duration::from_secs(10),
|
||||
)
|
||||
.await;
|
||||
// The reply is routed back by the remote server, so wait until it has
|
||||
// learned the client peer in the client network as well.
|
||||
let client_peer_id = client.peer_id();
|
||||
wait_for_condition(
|
||||
|| async {
|
||||
remote_server
|
||||
.foreign_network_snapshots(false)
|
||||
.await
|
||||
.get("client-net")
|
||||
.is_some_and(|network| {
|
||||
network
|
||||
.peers
|
||||
.iter()
|
||||
.any(|peer| peer.peer_id == client_peer_id)
|
||||
})
|
||||
},
|
||||
Duration::from_secs(10),
|
||||
)
|
||||
.await;
|
||||
let rpc = client
|
||||
.peer_manager()
|
||||
.get_peer_rpc_mgr()
|
||||
|
||||
Reference in New Issue
Block a user