diff --git a/tools/ldb_cmd_test.cc b/tools/ldb_cmd_test.cc index fc1a6fe8a..90cd08a8a 100644 --- a/tools/ldb_cmd_test.cc +++ b/tools/ldb_cmd_test.cc @@ -254,15 +254,18 @@ class FileChecksumTestHelper { // comparing it with the one being generated when a SST file is created. Status VerifyEachFileChecksum() { assert(db_ != nullptr); + EXPECT_OK(db_->DisableFileDeletions()); std::vector live_files; db_->GetLiveFilesMetaData(&live_files); + Status cs; for (auto a_file : live_files) { - Status cs = VerifyChecksum(a_file); + cs = VerifyChecksum(a_file); if (!cs.ok()) { - return cs; + break; } } - return Status::OK(); + EXPECT_OK(db_->EnableFileDeletions()); + return cs; } };