Fix build failure

Summary: fix the build failure

Test Plan: make all

Reviewers: sdong, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D43623
main
Poornima Chozhiyath Raman 9 years ago
parent 960d936e83
commit 7d364d0d94
  1. 56
      db/db_test.cc

@ -48,7 +48,6 @@
#include "rocksdb/thread_status.h" #include "rocksdb/thread_status.h"
#include "rocksdb/utilities/write_batch_with_index.h" #include "rocksdb/utilities/write_batch_with_index.h"
#include "rocksdb/utilities/checkpoint.h" #include "rocksdb/utilities/checkpoint.h"
#include "rocksdb/utilities/info_log_finder.h"
#include "rocksdb/utilities/optimistic_transaction_db.h" #include "rocksdb/utilities/optimistic_transaction_db.h"
#include "table/block_based_table_factory.h" #include "table/block_based_table_factory.h"
#include "table/mock_table.h" #include "table/mock_table.h"
@ -3848,19 +3847,9 @@ class WrappedBloom : public FilterPolicy {
}; };
} // namespace } // namespace
<<<<<<< HEAD
TEST_F(DBTest, BloomFilterWrapper) { TEST_F(DBTest, BloomFilterWrapper) {
Options options = CurrentOptions(); Options options = CurrentOptions();
options.statistics = rocksdb::CreateDBStatistics(); options.statistics = rocksdb::CreateDBStatistics();
=======
// Test scope:
// - We expect to open the data store when there is incomplete trailing writes
// at the end of any of the logs
// - We do not expect to open the data store for corruption
TEST_F(DBTest, kTolerateCorruptedTailRecords) {
const int jstart = RecoveryTestHelper::kWALFileOffset;
const int jend = jstart + RecoveryTestHelper::kWALFilesCount;
>>>>>>> Info Log List can be obtained
BlockBasedTableOptions table_options; BlockBasedTableOptions table_options;
WrappedBloom* policy = new WrappedBloom(10); WrappedBloom* policy = new WrappedBloom(10);
@ -3878,21 +3867,12 @@ TEST_F(DBTest, kTolerateCorruptedTailRecords) {
ASSERT_EQ(0U, policy->GetCounter()); ASSERT_EQ(0U, policy->GetCounter());
Flush(1); Flush(1);
<<<<<<< HEAD
// Check if they can be found // Check if they can be found
for (int i = 0; i < maxKey; i++) { for (int i = 0; i < maxKey; i++) {
ASSERT_EQ(Key(i), Get(1, Key(i))); ASSERT_EQ(Key(i), Get(1, Key(i)));
} }
ASSERT_EQ(TestGetTickerCount(options, BLOOM_FILTER_USEFUL), 0); ASSERT_EQ(TestGetTickerCount(options, BLOOM_FILTER_USEFUL), 0);
ASSERT_EQ(1U * maxKey, policy->GetCounter()); ASSERT_EQ(1U * maxKey, policy->GetCounter());
=======
// Test scope:
// We don't expect the data store to be opened if there is any corruption
// (leading, middle or trailing -- incomplete writes or corruption)
TEST_F(DBTest, kAbsoluteConsistency) {
const int jstart = RecoveryTestHelper::kWALFileOffset;
const int jend = jstart + RecoveryTestHelper::kWALFilesCount;
>>>>>>> Info Log List can be obtained
// Check if filter is useful // Check if filter is useful
for (int i = 0; i < maxKey; i++) { for (int i = 0; i < maxKey; i++) {
@ -3961,18 +3941,6 @@ TEST_F(DBTest, SnapshotFiles) {
} }
CopyFile(src, dest, size); CopyFile(src, dest, size);
} }
<<<<<<< HEAD
=======
}
}
// Test scope:
// - We expect to open the data store under all scenarios
// - We expect to have recovered records past the corruption zone
TEST_F(DBTest, kSkipAnyCorruptedRecords) {
const int jstart = RecoveryTestHelper::kWALFileOffset;
const int jend = jstart + RecoveryTestHelper::kWALFilesCount;
>>>>>>> Info Log List can be obtained
// release file snapshot // release file snapshot
dbfull()->DisableFileDeletions(); dbfull()->DisableFileDeletions();
@ -5944,7 +5912,6 @@ TEST_F(DBTest, DBIteratorBoundTest) {
} }
} }
<<<<<<< HEAD
TEST_F(DBTest, WriteSingleThreadEntry) { TEST_F(DBTest, WriteSingleThreadEntry) {
std::vector<std::thread> threads; std::vector<std::thread> threads;
dbfull()->TEST_LockMutex(); dbfull()->TEST_LockMutex();
@ -5961,29 +5928,6 @@ TEST_F(DBTest, WriteSingleThreadEntry) {
for (auto& t : threads) { for (auto& t : threads) {
t.join(); t.join();
} }
=======
TEST_F(DBTest, InfoLogFileList) {
Options options = CurrentOptions();
options.db_log_dir = test::TmpDir(env_);
options.max_background_flushes = 0;
CreateAndReopenWithCF({"pikachu"}, options);
ASSERT_OK(Put(1, "key", "value"));
std::vector<std::string> result;
auto s = GetInfoLogList(db_, &result);
ASSERT_TRUE(s.ok());
ASSERT_GT(result.size(), 0);
}
TEST_F(DBTest, PreShutdownFlush) {
Options options = CurrentOptions();
options.max_background_flushes = 0;
CreateAndReopenWithCF({"pikachu"}, options);
ASSERT_OK(Put(1, "key", "value"));
CancelAllBackgroundWork(db_);
Status s =
db_->CompactRange(CompactRangeOptions(), handles_[1], nullptr, nullptr);
ASSERT_TRUE(s.IsShutdownInProgress());
>>>>>>> Info Log List can be obtained
} }
TEST_F(DBTest, DisableDataSyncTest) { TEST_F(DBTest, DisableDataSyncTest) {

Loading…
Cancel
Save