diff --git a/packages/next-swc/crates/next-dev/benches/bundlers/turbopack.rs b/packages/next-swc/crates/next-dev/benches/bundlers/turbopack.rs index a29ac40ca1252..6f60abea7cb7e 100644 --- a/packages/next-swc/crates/next-dev/benches/bundlers/turbopack.rs +++ b/packages/next-swc/crates/next-dev/benches/bundlers/turbopack.rs @@ -79,7 +79,7 @@ impl Bundler for Turbopack { proc.stdout .as_mut() .ok_or_else(|| anyhow!("missing stdout"))?, - Regex::new("server listening on: (.*)")?, + Regex::new("started server on .+, url: (.*)")?, ) .ok_or_else(|| anyhow!("failed to find devserver address"))?; diff --git a/packages/next-swc/crates/next-dev/benches/mod.rs b/packages/next-swc/crates/next-dev/benches/mod.rs index edd1b06fa3b8e..7f4d08682f7ce 100644 --- a/packages/next-swc/crates/next-dev/benches/mod.rs +++ b/packages/next-swc/crates/next-dev/benches/mod.rs @@ -212,13 +212,15 @@ fn bench_hmr_internal(mut g: BenchmarkGroup, location: CodeLocation) { .await?; // Make warmup change - for _ in 0..MAX_UPDATE_TIMEOUT.as_secs() / 5 { + for i in (0..MAX_UPDATE_TIMEOUT.as_secs() / 5).rev() { match make_change(&mut guard, location, Duration::from_secs(5)) .await { Ok(_) => break, Err(err) => { - if err.to_string().contains(CHANGE_TIMEOUT_MESSAGE) { + if i != 0 + && err.to_string().contains(CHANGE_TIMEOUT_MESSAGE) + { continue; } return Err(err); diff --git a/packages/next-swc/crates/next-dev/benches/util/prepared_app.rs b/packages/next-swc/crates/next-dev/benches/util/prepared_app.rs index 3fd5bf2e31357..35ac6b95a7f5b 100644 --- a/packages/next-swc/crates/next-dev/benches/util/prepared_app.rs +++ b/packages/next-swc/crates/next-dev/benches/util/prepared_app.rs @@ -14,7 +14,6 @@ use chromiumoxide::{ Browser, Page, }; use futures::{FutureExt, StreamExt}; -use owo_colors::OwoColorize; use tokio::task::spawn_blocking; use url::Url; @@ -167,6 +166,7 @@ fn stop_process(proc: &mut Child) -> Result<()> { sys::signal::{kill, Signal}, unistd::Pid, }; + use owo_colors::OwoColorize; const KILL_DEADLINE: Duration = Duration::from_secs(5); const KILL_DEADLINE_CHECK_STEPS: u32 = 10; diff --git a/packages/next-swc/crates/next-dev/src/main.rs b/packages/next-swc/crates/next-dev/src/main.rs index c3237186205be..1b15cc8503efb 100644 --- a/packages/next-swc/crates/next-dev/src/main.rs +++ b/packages/next-swc/crates/next-dev/src/main.rs @@ -115,8 +115,8 @@ async fn main() -> Result<()> { format!("http://{}", server.addr) }; println!( - "{event_type} - started server on {}:{}, url: {}", - event_type = "ready".green(), + "{} - started server on {}:{}, url: {}", + "ready".green(), server.addr.ip(), server.addr.port(), index_uri