Skip to content

Commit

Permalink
test: more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
effervescentia committed Apr 14, 2024
1 parent 5e83913 commit a827173
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/src/resolve/file_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a827173

Please sign in to comment.