From 27fb9a400291984ba85f5de53b3e72e4f15cc657 Mon Sep 17 00:00:00 2001 From: Tarek Date: Wed, 12 Jun 2024 23:24:56 +0300 Subject: [PATCH] add delay in tests after file write 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 276c808c..736fbc03 100644 --- a/fs-storage/src/file_storage.rs +++ b/fs-storage/src/file_storage.rs @@ -375,6 +375,7 @@ mod tests { .modified() .unwrap(); file_storage.write_fs().unwrap(); + std::thread::sleep(std::time::Duration::from_secs(1)); let after_write = fs::metadata(&storage_path) .unwrap() .modified() @@ -418,6 +419,7 @@ mod tests { ); mirror_storage.write_fs().unwrap(); + std::thread::sleep(std::time::Duration::from_secs(1)); assert_eq!(mirror_storage.sync_status().unwrap(), SyncStatus::InSync); // receive updates from external data manipulation