From 9b87daad7e79904ef451b98211133b1142bedc29 Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Wed, 28 Sep 2022 12:26:24 +0100 Subject: [PATCH] net: don't use port 8080 in tests (#5062) --- tokio/tests/net_panic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/tests/net_panic.rs b/tokio/tests/net_panic.rs index ee5f6e4bc6e..fc2209ad4b0 100644 --- a/tokio/tests/net_panic.rs +++ b/tokio/tests/net_panic.rs @@ -15,7 +15,7 @@ fn udp_socket_from_std_panic_caller() -> Result<(), Box> { use std::net::SocketAddr; use tokio::net::UdpSocket; - let addr = "127.0.0.1:8080".parse::().unwrap(); + let addr = "127.0.0.1:0".parse::().unwrap(); let std_sock = std::net::UdpSocket::bind(addr).unwrap(); std_sock.set_nonblocking(true).unwrap(); @@ -34,7 +34,7 @@ fn udp_socket_from_std_panic_caller() -> Result<(), Box> { #[test] fn tcp_listener_from_std_panic_caller() -> Result<(), Box> { - let std_listener = std::net::TcpListener::bind("127.0.0.1:8080").unwrap(); + let std_listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap(); std_listener.set_nonblocking(true).unwrap(); let panic_location_file = test_panic(|| {