From 26da033aabd3cf2b1d48822a0cabfae3172f706e Mon Sep 17 00:00:00 2001 From: Bruce Guenter Date: Fri, 21 Apr 2023 17:26:48 -0600 Subject: [PATCH] Ignore failing file watcher assertion on Windows --- lib/file-source/src/file_watcher/tests/experiment.rs | 1 + .../src/file_watcher/tests/experiment_no_truncations.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/file-source/src/file_watcher/tests/experiment.rs b/lib/file-source/src/file_watcher/tests/experiment.rs index c3fa593087c7c..decdbdab98240 100644 --- a/lib/file-source/src/file_watcher/tests/experiment.rs +++ b/lib/file-source/src/file_watcher/tests/experiment.rs @@ -49,6 +49,7 @@ fn experiment(actions: Vec) { match *action { FileWatcherAction::DeleteFile => { _ = fs::remove_file(&path); + #[cfg(not(windows))] // Windows will only remove after the file is closed. assert!(!path.exists()); fwfiles[0].reset(); break; diff --git a/lib/file-source/src/file_watcher/tests/experiment_no_truncations.rs b/lib/file-source/src/file_watcher/tests/experiment_no_truncations.rs index d7abe2b3829b8..ee8a24a9f95bf 100644 --- a/lib/file-source/src/file_watcher/tests/experiment_no_truncations.rs +++ b/lib/file-source/src/file_watcher/tests/experiment_no_truncations.rs @@ -33,6 +33,7 @@ fn experiment_no_truncations(actions: Vec) { match *action { FileWatcherAction::DeleteFile => { _ = fs::remove_file(&path); + #[cfg(not(windows))] // Windows will only remove after the file is closed. assert!(!path.exists()); fwfiles[0].reset(); break;