From a1c0cd42f5d5d006ebdee4188f4b65ffd9466943 Mon Sep 17 00:00:00 2001 From: fr34aky <162515565+fr34aky@users.noreply.github.com> Date: Thu, 10 Sep 2026 19:06:15 +0000 Subject: [PATCH] fix(transport): make the invalid-hostname test independent of the search domain test_resolve_socket_addr_invalid asserts that nonexistent.invalid does not resolve. On a host whose /etc/resolv.conf search domain has a wildcard A record, it does: libc appends the search domain, the wildcard answers for nonexistent.invalid., and the assertion inverts. The test then fails on that host and nowhere else, which reads as a flake. The name is now written absolute, with a trailing dot, so search-list expansion never applies and the reserved .invalid TLD returns NXDOMAIN from the root wherever the test runs. Verified on a host that reproduced the failure: fails before, passes after. --- src/transport/udp/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport/udp/mod.rs b/src/transport/udp/mod.rs index 0fc65feb..9ea1a3f8 100644 --- a/src/transport/udp/mod.rs +++ b/src/transport/udp/mod.rs @@ -1029,7 +1029,7 @@ mod tests { #[tokio::test] async fn test_resolve_socket_addr_invalid() { - let invalid = TransportAddr::from_string("nonexistent.invalid:2121"); + let invalid = TransportAddr::from_string("nonexistent.invalid.:2121"); assert!(resolve_socket_addr(&invalid).await.is_err()); let binary = TransportAddr::new(vec![0xff, 0x80]);