Skip to content

Commit

Permalink
Ignore failing file watcher assertion on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceg committed Apr 21, 2023
1 parent 14551b6 commit 26da033
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/file-source/src/file_watcher/tests/experiment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn experiment(actions: Vec<FileWatcherAction>) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fn experiment_no_truncations(actions: Vec<FileWatcherAction>) {
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;
Expand Down

0 comments on commit 26da033

Please sign in to comment.