Skip to content

Commit

Permalink
retry CI setup steps if needed (vercel/turbo#2692)
Browse files Browse the repository at this point in the history
* retry setup steps if needed

* retry install nextest step

* retry browser launch

* ignore errors from PR comment failing due to PR from fork
  • Loading branch information
sokra committed Nov 14, 2022
1 parent 9711a7e commit 32593ea
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/next-swc/crates/next-dev/benches/util/mod.rs
Expand Up @@ -140,7 +140,17 @@ pub async fn create_browser() -> Browser {
if with_devtools {
builder = builder.arg("--auto-open-devtools-for-tabs");
}
let (browser, mut handler) = Browser::launch(builder.build().unwrap()).await.unwrap();
let (browser, mut handler) = retry_async(
builder.build().unwrap(),
|c| {
let c = c.clone();
async { Ok(Browser::launch(c).await?) }
},
3,
Duration::from_millis(100),
)
.await
.expect("Launching the browser failed");

// See https://crates.io/crates/chromiumoxide
tokio::task::spawn(async move {
Expand Down

0 comments on commit 32593ea

Please sign in to comment.