Removed unneccessary flushes

This commit is contained in:
Sebastian Meßmer 2015-04-18 17:06:55 +02:00
parent 73b060c863
commit 17f6a38629
2 changed files with 0 additions and 7 deletions

View File

@ -36,7 +36,6 @@ TEST_F(OnDiskBlockCreateTest, CreatingBlockCreatesFile) {
EXPECT_FALSE(bf::exists(file.path()));
auto block = OnDiskBlock::CreateOnDisk(dir.path(), key, Data(0));
block->flush();
EXPECT_TRUE(bf::exists(file.path()));
EXPECT_TRUE(bf::is_regular_file(file.path()));
@ -44,7 +43,6 @@ TEST_F(OnDiskBlockCreateTest, CreatingBlockCreatesFile) {
TEST_F(OnDiskBlockCreateTest, CreatingExistingBlockReturnsNull) {
auto block1 = OnDiskBlock::CreateOnDisk(dir.path(), key, Data(0));
block1->flush();
auto block2 = OnDiskBlock::CreateOnDisk(dir.path(), key, Data(0));
EXPECT_TRUE((bool)block1);
EXPECT_FALSE((bool)block2);
@ -59,7 +57,6 @@ public:
block(OnDiskBlock::CreateOnDisk(dir.path(), key, std::move(Data(GetParam()).FillWithZeroes()))),
ZEROES(block->size())
{
block->flush();
ZEROES.FillWithZeroes();
}
};

View File

@ -72,7 +72,6 @@ INSTANTIATE_TEST_CASE_P(OnDiskBlockFlushTest, OnDiskBlockFlushTest, Values((size
TEST_P(OnDiskBlockFlushTest, AfterCreate_FlushingDoesntChangeBlock) {
auto block = CreateBlock();
WriteDataToBlock(block);
block->flush();
EXPECT_BLOCK_DATA_CORRECT(block);
}
@ -82,7 +81,6 @@ TEST_P(OnDiskBlockFlushTest, AfterCreate_FlushingDoesntChangeBlock) {
TEST_P(OnDiskBlockFlushTest, AfterLoad_FlushingDoesntChangeBlock) {
auto block = CreateBlockAndLoadItFromDisk();
WriteDataToBlock(block);
block->flush();
EXPECT_BLOCK_DATA_CORRECT(block);
}
@ -90,7 +88,6 @@ TEST_P(OnDiskBlockFlushTest, AfterLoad_FlushingDoesntChangeBlock) {
TEST_P(OnDiskBlockFlushTest, AfterCreate_FlushingWritesCorrectData) {
auto block = CreateBlock();
WriteDataToBlock(block);
block->flush();
EXPECT_STORED_FILE_DATA_CORRECT();
}
@ -98,7 +95,6 @@ TEST_P(OnDiskBlockFlushTest, AfterCreate_FlushingWritesCorrectData) {
TEST_P(OnDiskBlockFlushTest, AfterLoad_FlushingWritesCorrectData) {
auto block = CreateBlockAndLoadItFromDisk();
WriteDataToBlock(block);
block->flush();
EXPECT_STORED_FILE_DATA_CORRECT();
}