fix tests (#588)

fix proxy_three_node_disconnect_test and hole_punching_symmetric_only_random
This commit is contained in:
Sijie.Sun
2025-01-27 15:17:47 +08:00
committed by GitHub
parent d0f26d9303
commit 08546925cc
6 changed files with 110 additions and 66 deletions

View File

@@ -490,6 +490,11 @@ pub async fn proxy_three_node_disconnect_test(#[values("tcp", "wg")] proto: &str
}
inst4.run().await.unwrap();
tracing::info!("inst1 peer id: {:?}", insts[0].peer_id());
tracing::info!("inst2 peer id: {:?}", insts[1].peer_id());
tracing::info!("inst3 peer id: {:?}", insts[2].peer_id());
tracing::info!("inst4 peer id: {:?}", inst4.peer_id());
let task = tokio::spawn(async move {
for _ in 1..=2 {
tokio::time::sleep(tokio::time::Duration::from_secs(8)).await;
@@ -521,7 +526,10 @@ pub async fn proxy_three_node_disconnect_test(#[values("tcp", "wg")] proto: &str
.find(|r| r.peer_id == inst4.peer_id())
.is_none()
},
Duration::from_secs(15),
// 0 down
// [1, 6) send ping
// [3, 8) ping fail and close connection
Duration::from_millis(8300),
)
.await;
set_link_status("net_d", true);