diff --git a/crates/ui-egui/src/dialogs/caf_ui/tests.rs b/crates/ui-egui/src/dialogs/caf_ui/tests.rs index e2d2031ac38..de280dfdc2d 100644 --- a/crates/ui-egui/src/dialogs/caf_ui/tests.rs +++ b/crates/ui-egui/src/dialogs/caf_ui/tests.rs @@ -314,9 +314,9 @@ fn a_background_fill_remembers_its_settings_only_when_its_job_is_applied() { assert_eq!(saved(&app), Some(remembered), "nothing is remembered while the fill runs"); assert_eq!(app.jobs.caf_settings.len(), 1, "the fill runs as a background job"); let ctx = ctx(&app); - let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30); + // No deadline of its own: a loaded runner can take over a minute for the fill, and the test runner's + // timeout catches a job that never ends. while app.session.has_jobs() { - assert!(std::time::Instant::now() < deadline, "the fill job did not end"); crate::jobs_ui::tick(&mut app, &ctx); std::thread::sleep(std::time::Duration::from_millis(1)); } diff --git a/crates/ui-egui/src/home_recent_ui.rs b/crates/ui-egui/src/home_recent_ui.rs index 73bf1966447..650a1c07a6a 100644 --- a/crates/ui-egui/src/home_recent_ui.rs +++ b/crates/ui-egui/src/home_recent_ui.rs @@ -559,6 +559,10 @@ mod tests { assert_ne!(before, revision_of(&app, &path_string), "invalidation must change the real source's revision"); // Check invalidation with unchanged metadata first, then make stale and fresh decoder pixels distinct. std::fs::write(&path_string, flat_png([20, 100, 60, 255])).unwrap(); + // The revision read above statted the old file. Let that stat expire and read the new file now, so no + // stat between the passes below changes the revision under the replacement decoder (#18011). + std::thread::sleep(RECHECK_INTERVAL); + revision_of(&app, &path_string); // The former picture may be a stand-in, but it cannot satisfy the invalidated revision as Ready. assert!(