Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 86d06fd44f test(index): wait for the snapshot instead of a fixed 150 ms
incremental_changes_refresh_the_warm_start_snapshot failed on loaded CI runners (macOS and Windows): the snapshot is written on the worker's next round after a short delay, which a fixed sleep doesn't always cover. The test now polls for it.
2026-11-16 05:21:16 +08:00
+7 -2
Переглянути файл
@@ -779,8 +779,13 @@ fn incremental_changes_refresh_the_warm_start_snapshot() {
let changed = f.write("src/a.rs", "fn renamed() {}\n");
idx.update(&[changed], &[]);
assert!(idx.wait_idle(WAIT));
std::thread::sleep(Duration::from_millis(150));
assert!(f.cache.join("index.snapshot").exists(), "a watcher update must regenerate the snapshot");
// The snapshot is written after a short delay, on the worker's next round.
let snapshot = f.cache.join("index.snapshot");
let deadline = std::time::Instant::now() + WAIT;
while !snapshot.exists() && std::time::Instant::now() < deadline {
std::thread::sleep(Duration::from_millis(20));
}
assert!(snapshot.exists(), "a watcher update must regenerate the snapshot");
}
#[test]