exclude get db property calls from rocksdb_lite (#4619)

Summary:
fix current failing lite test:
> In file included from ./util/testharness.h:15:0,
                 from ./table/mock_table.h:23,
                 from ./db/db_test_util.h:44,
                 from db/db_flush_test.cc:10:
db/db_flush_test.cc: In member function ‘virtual void rocksdb::DBFlushTest_ManualFlushFailsInReadOnlyMode_Test::TestBody()’:
db/db_flush_test.cc:250:35: error: ‘Properties’ is not a member of ‘rocksdb::DB’
   ASSERT_TRUE(db_->GetIntProperty(DB::Properties::kBackgroundErrors,
                                   ^
make: *** [db/db_flush_test.o] Error 1
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4619

Differential Revision: D12898319

Pulled By: miasantreble

fbshipit-source-id: 72de603b1f2e972fc8caa88611798c4e98e348c6
This commit is contained in:
Zhongyi Xie 2018-11-02 11:25:06 -07:00 committed by Facebook Github Bot
parent 55c0349274
commit 61311157ff

View File

@ -246,10 +246,12 @@ TEST_F(DBFlushTest, ManualFlushFailsInReadOnlyMode) {
fault_injection_env->SetFilesystemActive(false); fault_injection_env->SetFilesystemActive(false);
ASSERT_OK(db_->ContinueBackgroundWork()); ASSERT_OK(db_->ContinueBackgroundWork());
dbfull()->TEST_WaitForFlushMemTable(); dbfull()->TEST_WaitForFlushMemTable();
#ifndef ROCKSDB_LITE
uint64_t num_bg_errors; uint64_t num_bg_errors;
ASSERT_TRUE(db_->GetIntProperty(DB::Properties::kBackgroundErrors, ASSERT_TRUE(db_->GetIntProperty(DB::Properties::kBackgroundErrors,
&num_bg_errors)); &num_bg_errors));
ASSERT_GT(num_bg_errors, 0); ASSERT_GT(num_bg_errors, 0);
#endif // ROCKSDB_LITE
// In the bug scenario, triggering another flush would cause the second flush // In the bug scenario, triggering another flush would cause the second flush
// to hang forever. After the fix we expect it to return an error. // to hang forever. After the fix we expect it to return an error.