From cb8e0aa38f14c0d76f19fab784d3dd6e4b3c5b62 Mon Sep 17 00:00:00 2001 From: Tarek Date: Wed, 12 Jun 2024 19:18:07 +0300 Subject: [PATCH] add delay EVERYWHERE Signed-off-by: Tarek --- fs-storage/src/file_storage.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs-storage/src/file_storage.rs b/fs-storage/src/file_storage.rs index 36b9d9ff..8de6f37a 100644 --- a/fs-storage/src/file_storage.rs +++ b/fs-storage/src/file_storage.rs @@ -377,6 +377,7 @@ mod tests { .unwrap() .modified() .unwrap(); + std::thread::sleep(std::time::Duration::from_secs(1)); file_storage.write_fs().unwrap(); let after_write = fs::metadata(&storage_path) .unwrap() @@ -448,6 +449,7 @@ mod tests { file_storage.sync_status().unwrap(), SyncStatus::StorageStale ); + std::thread::sleep(std::time::Duration::from_secs(1)); file_storage.write_fs().unwrap(); // `write_fs()` updates the storage on disk, so the storage is in sync assert_eq!(file_storage.sync_status().unwrap(), SyncStatus::InSync);