From e8a33d53f560d653fdec70006acb6d95e99131ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 8 May 2026 17:54:32 -0400 Subject: [PATCH] Stabilize PRD site sidecar snapshots --- crates/ely_servo_host/tests/sidecar/support.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ely_servo_host/tests/sidecar/support.rs b/crates/ely_servo_host/tests/sidecar/support.rs index d541846..7094726 100644 --- a/crates/ely_servo_host/tests/sidecar/support.rs +++ b/crates/ely_servo_host/tests/sidecar/support.rs @@ -10,6 +10,7 @@ use std::{ pub(super) const MINIMUM_CONTENT_PIXELS: u64 = 1_000; const SIDECAR_TIMEOUT: Duration = Duration::from_secs(45); const SIDECAR_POLL_INTERVAL: Duration = Duration::from_millis(20); +const SIDECAR_COMMAND_COOLDOWN: Duration = Duration::from_millis(750); const SIDECAR_RETRY_INTERVAL: Duration = Duration::from_millis(250); static SIDECAR_COMMAND_LOCK: Mutex<()> = Mutex::new(()); pub(super) const PRD_SITE_COMPATIBILITY_CASES: &[PrdSiteCompatibilityCase] = &[ @@ -357,11 +358,14 @@ fn run_sidecar_snapshot( let started_at = Instant::now(); loop { if child.try_wait()?.is_some() { - return child.wait_with_output().map_err(Into::into); + let output = child.wait_with_output()?; + thread::sleep(SIDECAR_COMMAND_COOLDOWN); + return Ok(output); } if started_at.elapsed() >= SIDECAR_TIMEOUT { terminate_child(child)?; + thread::sleep(SIDECAR_COMMAND_COOLDOWN); return Err(format!( "timed out rendering {site_url} at {}x{}", size.width, size.height