Skip to content

Commit

Permalink
Also wait before modifying the file a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianFeldmann committed Dec 4, 2024
1 parent cba6c64 commit 7d476f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions YUViewUnitTest/dataSource/DataSourceLocalFileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ TEST(DataSourceLocalFileTest, ModifyOpenedFileExternally_ShouldBeDetected)
EXPECT_EQ(file.read(buffer, 4), 4);
EXPECT_THAT(buffer, ElementsAre('t', 'e', 's', 't'));

std::this_thread::sleep_for(std::chrono::seconds(1));

std::ofstream tempFileWriter(tempFile.getFilePath(), std::iostream::out | std::iostream::binary);
tempFileWriter << 'm' << 'o' << 'd' << 'i' << 'f' << 'i' << 'e' << 'd';
tempFileWriter.close();
Expand Down

0 comments on commit 7d476f8

Please sign in to comment.