Fix test on Windows hosts

FlushFileBuffers requires that a file be opened for writing
This commit is contained in:
David Cook 2020-05-25 13:20:29 -05:00
parent 7ba8bbc49f
commit 3252082474

View File

@ -188,7 +188,7 @@ fn test_file_sync() {
let path = prepare_with_content("miri_test_fs_sync.txt", bytes);
// Test that we can call sync_data and sync_all (can't readily test effects of this operation)
let file = File::open(&path).unwrap();
let file = OpenOptions::new().write(true).open(&path).unwrap();
file.sync_data().unwrap();
file.sync_all().unwrap();