Skip to content
Prev Previous commit
Next Next commit
Add more delays
things can run too fast apparently
  • Loading branch information
thecrypticace committed Oct 30, 2024
commit 4debc6fdabe8ac8a82a729b6092efd43fc9ce66b
13 changes: 13 additions & 0 deletions crates/oxide/tests/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ mod scanner {
]
);

// We have to sleep because it might run too fast (seriously) and the
// mtimes of the directories end up being the same as the last time we
// checked them
sleep(Duration::from_millis(100));

// Create files
Expand All @@ -428,6 +431,11 @@ mod scanner {
]
);

// We have to sleep because it might run too fast (seriously) and the
// mtimes of the directories end up being the same as the last time we
// checked them
sleep(Duration::from_millis(100));

// Create folders
create_files_in(
&dir,
Expand Down Expand Up @@ -457,6 +465,11 @@ mod scanner {
]
);

// We have to sleep because it might run too fast (seriously) and the
// mtimes of the directories end up being the same as the last time we
// checked them
sleep(Duration::from_millis(100));

// Create folders
create_files_in(
&dir,
Expand Down