From 9361d49fa663261d9f911cc88fbb3738e6610299 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 12 Apr 2026 14:32:10 -0400 Subject: [PATCH] Stabilize TCP host-only bind fallback test --- lib/crates/fabro-cli/tests/it/cmd/server_start.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/crates/fabro-cli/tests/it/cmd/server_start.rs b/lib/crates/fabro-cli/tests/it/cmd/server_start.rs index a155066d8..18a30c22d 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/server_start.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/server_start.rs @@ -199,8 +199,10 @@ fn start_with_tcp_host_only_bind_warns_and_falls_back_when_default_port_is_unava let storage_root = isolated_storage_dir(); let storage_dir = storage_root.path().join("storage"); let occupied = match std::net::TcpListener::bind(("127.0.0.1", 32276)) { - Ok(listener) => Some(listener), - Err(error) if error.kind() == std::io::ErrorKind::AddrInUse => None, + Ok(listener) => listener, + Err(error) if error.kind() == std::io::ErrorKind::AddrInUse => { + return; + } Err(error) => panic!("failed to bind default TCP port 32276: {error}"), };