rename wait_for_server to reflect change

in wait_for_port
This commit is contained in:
Gwen Lg 2024-06-13 22:23:41 +02:00
parent a5cd13771b
commit 2d86172f17

View File

@ -1,4 +1,4 @@
use crate::server::utils::{get_free_port, wait_for_port};
use crate::server::utils::{get_free_port, wait_for_server};
use mktemp::Temp;
use std::error::Error;
use std::io::{self, Cursor, Read};
@ -56,7 +56,7 @@ impl EmbeddedServer {
.stderr(Stdio::piped())
.spawn()?;
wait_for_port(&mut child, port)?;
wait_for_server(&mut child, port)?;
Ok(Self {
_srv_dir: dest,
@ -98,7 +98,7 @@ mod utils {
Ok(port)
}
pub fn wait_for_port(child: &mut Child, port: u16) -> std::io::Result<()> {
pub fn wait_for_server(child: &mut Child, port: u16) -> std::io::Result<()> {
for _ in 0..50 {
check_server(child)?;
if port_scanner::scan_port(port) {