Merge PR #2004: the tests_offline bounded wait only

Its tests_export.rs and tests_folder_drop.rs hunks are covered by #1975 and #1967; resolved to the merged version.
This commit is contained in:
aiongg
2026-10-21 14:52:48 +00:00
+5
View File
@@ -155,6 +155,11 @@ fn offline_originals_never_block_a_frame() {
h.app.session.execute("library.source", &json!({"kind": "missing"})).unwrap();
assert_eq!(h.app.session.source, LibrarySource::Missing);
frames_while_asleep(&mut h, &nas, 20, "Missing Photos");
// the probe runs on the background worker: give it time to start on a loaded machine
let asked = std::time::Instant::now();
while calls.n.load(Ordering::SeqCst) == 0 && asked.elapsed() < std::time::Duration::from_secs(5) {
std::thread::sleep(std::time::Duration::from_millis(10));
}
assert!(calls.n.load(Ordering::SeqCst) > 0, "the probe was asked");
assert_eq!(h.app.session.visible().len(), 0, "unknown files count as there");