We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b94f67 + 0884c68 commit c10a629Copy full SHA for c10a629
src/tools/miri/tests/pass-dep/tokio/file-io.rs
@@ -21,6 +21,10 @@ async fn test_create_and_write() -> io::Result<()> {
21
22
// Write 10 bytes to the file.
23
file.write_all(b"some bytes").await?;
24
+ // For tokio's file I/O, `await` does not have its usual semantics of waiting until the
25
+ // operation is completed, so we have to wait some more to make sure the write is completed.
26
+ file.flush().await?;
27
+ // Check that 10 bytes have been written.
28
assert_eq!(file.metadata().await.unwrap().len(), 10);
29
30
remove_file(&path).unwrap();
0 commit comments