fix: resolve slow exit and reduce test timeouts (#1970)

- Explicitly shutdown tokio runtime on launcher cleanup to fix slow exit
- Add timeout to tunnel connector in tests to prevent hanging
- Reduce test wait durations from 5s to 100ms for faster test execution
- Bump num-bigint-dig from 0.8.4 to 0.8.6
This commit is contained in:
KKRainbow
2026-03-08 12:27:42 +08:00
committed by GitHub
parent c4eacf4591
commit f3db348b01
5 changed files with 130 additions and 120 deletions
+6 -3
View File
@@ -495,17 +495,20 @@ pub mod tests {
L: TunnelListener + Send + Sync + 'static,
C: TunnelConnector + Send + Sync + 'static,
{
_tunnel_pingpong_netns(
_tunnel_pingpong_netns_with_timeout(
listener,
connector,
NetNS::new(None),
NetNS::new(None),
"12345678abcdefg".as_bytes().to_vec(),
// only used by tunnel test, so set a long timeout
tokio::time::Duration::from_secs(5),
)
.await;
.await
.unwrap();
}
pub(crate) async fn _tunnel_pingpong_netns<L, C>(
async fn _tunnel_pingpong_netns<L, C>(
mut listener: L,
mut connector: C,
l_netns: NetNS,