From 3644523303dfd9245ee522ce4269e9af2e3441c2 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Fri, 5 Jul 2024 09:54:01 +0800 Subject: [PATCH] flush --- tests/test_corofile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_corofile.cpp b/tests/test_corofile.cpp index d7e809b1..10b3e997 100644 --- a/tests/test_corofile.cpp +++ b/tests/test_corofile.cpp @@ -682,6 +682,10 @@ TEST_CASE("large_file_write_test") { async_simple::coro::syncAwait( file.async_write({block_vec.data(), (size_t)remain})); } + auto &stream = file.get_stream_file(); + if (stream) { + stream.flush(); + } CHECK(fs::file_size(filename) == file_size); std::ifstream is(filename, std::ios::binary); if (!is.is_open()) {