diff --git a/engine/src/resolve/file_cache.rs b/engine/src/resolve/file_cache.rs index c701765b..e167bbdf 100644 --- a/engine/src/resolve/file_cache.rs +++ b/engine/src/resolve/file_cache.rs @@ -68,7 +68,7 @@ where mod tests { use super::FileCache; use crate::{resolve::Resolver, FileSystem}; - use std::{fs, path::Path}; + use std::{fs, path::Path, thread::sleep, time::Duration}; use tempfile::tempdir; const TARGET_FILE: &str = "target_file.txt"; @@ -122,6 +122,8 @@ mod tests { let cache = FileSystem(cache_dir.path()); cache.write(TARGET_FILE, STALE_DATA); + sleep(Duration::from_millis(1)); + let source_dir = tempdir().unwrap(); let source = FileSystem(source_dir.path()); source.write(TARGET_FILE, FRESH_DATA);