Make mock_env_test runnable in ROCKSDB_LITE

Summary: Make mock_env_test runnable in ROCKSDB_LITE

Test Plan: mock_env_test

Reviewers: igor, sdong, yhchiang, kradhakrishnan, anthony

Reviewed By: anthony

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D42585
This commit is contained in:
Islam AbdelRahman 2015-07-20 11:19:51 -07:00
parent c06d1d8393
commit ce9712d340
1 changed files with 3 additions and 0 deletions

View File

@ -252,6 +252,8 @@ TEST_F(MockEnvTest, DBTest) {
ASSERT_TRUE(!iterator->Valid()); ASSERT_TRUE(!iterator->Valid());
delete iterator; delete iterator;
// TEST_FlushMemTable() is not supported in ROCKSDB_LITE
#ifndef ROCKSDB_LITE
DBImpl* dbi = reinterpret_cast<DBImpl*>(db); DBImpl* dbi = reinterpret_cast<DBImpl*>(db);
ASSERT_OK(dbi->TEST_FlushMemTable()); ASSERT_OK(dbi->TEST_FlushMemTable());
@ -260,6 +262,7 @@ TEST_F(MockEnvTest, DBTest) {
ASSERT_OK(db->Get(ReadOptions(), keys[i], &res)); ASSERT_OK(db->Get(ReadOptions(), keys[i], &res));
ASSERT_TRUE(res == vals[i]); ASSERT_TRUE(res == vals[i]);
} }
#endif // ROCKSDB_LITE
delete db; delete db;
} }