Fix two namings in fault_injection_test.cc

Summary: fault_injection_test.cc has two variable names not following the convention fix it.

Test Plan: run the test

Reviewers: rven, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D32097
This commit is contained in:
sdong 2015-01-23 16:03:24 -08:00
parent b4c13a868a
commit c2e8e8c1c0

View File

@ -363,9 +363,9 @@ class FaultInjectionTest {
}; };
int option_config_; int option_config_;
// When need to make sure data is persistent, sync WAL // When need to make sure data is persistent, sync WAL
bool sync_use_wal; bool sync_use_wal_;
// When need to make sure data is persistent, call DB::CompactRange() // When need to make sure data is persistent, call DB::CompactRange()
bool sync_use_compact; bool sync_use_compact_;
protected: protected:
public: public:
@ -384,8 +384,8 @@ class FaultInjectionTest {
FaultInjectionTest() FaultInjectionTest()
: option_config_(kDefault), : option_config_(kDefault),
sync_use_wal(false), sync_use_wal_(false),
sync_use_compact(true), sync_use_compact_(true),
env_(NULL), env_(NULL),
db_(NULL) { db_(NULL) {
NewDB(); NewDB();
@ -404,8 +404,8 @@ class FaultInjectionTest {
// Return the current option configuration. // Return the current option configuration.
Options CurrentOptions() { Options CurrentOptions() {
sync_use_wal = false; sync_use_wal_ = false;
sync_use_compact = true; sync_use_compact_ = true;
Options options; Options options;
switch (option_config_) { switch (option_config_) {
case kWalDir: case kWalDir:
@ -416,13 +416,13 @@ class FaultInjectionTest {
1000000U); 1000000U);
break; break;
case kSyncWal: case kSyncWal:
sync_use_wal = true; sync_use_wal_ = true;
sync_use_compact = false; sync_use_compact_ = false;
break; break;
case kWalDirSyncWal: case kWalDirSyncWal:
options.wal_dir = test::TmpDir(env_) + "/fault_test_wal"; options.wal_dir = test::TmpDir(env_) + "/fault_test_wal";
sync_use_wal = true; sync_use_wal_ = true;
sync_use_compact = false; sync_use_compact_ = false;
break; break;
default: default:
break; break;
@ -583,10 +583,10 @@ class FaultInjectionTest {
DeleteAllData(); DeleteAllData();
WriteOptions write_options; WriteOptions write_options;
write_options.sync = sync_use_wal; write_options.sync = sync_use_wal_;
Build(write_options, 0, num_pre_sync); Build(write_options, 0, num_pre_sync);
if (sync_use_compact) { if (sync_use_compact_) {
db_->CompactRange(nullptr, nullptr); db_->CompactRange(nullptr, nullptr);
} }
write_options.sync = false; write_options.sync = false;