From 6d319cba1dea4518e82224a8b74bb47a01bf0f1f Mon Sep 17 00:00:00 2001 From: Luna Yao <40349250+ZnqbuZ@users.noreply.github.com> Date: Wed, 15 Apr 2026 13:39:00 +0200 Subject: [PATCH] tests(relay_peer_e2e_encryption): wait for the key of inst3 before ping test (#2069) --- easytier/src/tests/three_node.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/easytier/src/tests/three_node.rs b/easytier/src/tests/three_node.rs index 8436c0a3..5832771f 100644 --- a/easytier/src/tests/three_node.rs +++ b/easytier/src/tests/three_node.rs @@ -3150,6 +3150,20 @@ pub async fn relay_peer_e2e_encryption(#[values("tcp", "udp")] proto: &str) { .map(|i| i.noise_static_pubkey.len()) ); + // Wait until relay route info includes inst3 static pubkey for IK handshake. + wait_for_condition( + || async { + insts[0] + .get_peer_manager() + .get_peer_map() + .get_route_peer_info(inst3_peer_id) + .await + .is_some_and(|info| !info.noise_static_pubkey.is_empty()) + }, + Duration::from_secs(10), + ) + .await; + // Test basic connectivity through relay println!("Starting ping test from net_a to 10.144.144.3...");