diff --git a/backend/test_utils/src/server/utils.rs b/backend/test_utils/src/server/utils.rs index 3946159..ed22991 100644 --- a/backend/test_utils/src/server/utils.rs +++ b/backend/test_utils/src/server/utils.rs @@ -9,7 +9,7 @@ use tokio::time::Duration; /// because we want to allow the kernel to assign ports and so don't specify a port as an arg. pub async fn get_port(reader: R) -> Result { let expected_text = "listening on http://127.0.0.1:"; - wait_for_line_containing(reader, expected_text, Duration::from_secs(30)) + wait_for_line_containing(reader, expected_text, Duration::from_secs(60)) .await .and_then(|line| { let (_, port_str) = line.rsplit_once(expected_text).unwrap(); @@ -65,6 +65,9 @@ pub async fn connect_multiple_to_uri( uri: &http::Uri, num_connections: usize, ) -> Result, ws_client::ConnectError> { + + // Batch connection establishing to groups of 100 at a time; I found while benchmarking that + // I'd run into "connection reset by peer" issues trying to establish more at once. let connect_futs = (0..num_connections).map(|_| ws_client::connect(uri)); let sockets: Result, _> = futures::future::join_all(connect_futs) .await