diff --git a/db/db_test_util.h b/db/db_test_util.h index d179882c8b8..0fdd1d62b66 100644 --- a/db/db_test_util.h +++ b/db/db_test_util.h @@ -610,37 +610,6 @@ class MockTimeEnv : public EnvWrapper { uint64_t current_time_ = 0; }; -class MockTimeEnv : public EnvWrapper { - public: - explicit MockTimeEnv(Env* base) : EnvWrapper(base) {} - - virtual Status GetCurrentTime(int64_t* time) override { - assert(time != nullptr); - assert(current_time_ <= - static_cast(std::numeric_limits::max())); - *time = static_cast(current_time_); - return Status::OK(); - } - - virtual uint64_t NowMicros() override { - assert(current_time_ <= std::numeric_limits::max() / 1000000); - return current_time_ * 1000000; - } - - virtual uint64_t NowNanos() override { - assert(current_time_ <= std::numeric_limits::max() / 1000000000); - return current_time_ * 1000000000; - } - - void set_current_time(uint64_t time) { - assert(time >= current_time_); - current_time_ = time; - } - - private: - uint64_t current_time_ = 0; -}; - #ifndef ROCKSDB_LITE class OnFileDeletionListener : public EventListener { public: @@ -737,8 +706,8 @@ class DBTestBase : public testing::Test { // The types of envs that we want to test with enum OptionConfigEnv { - kDefaultEnv = 0, // posix env - kAwsEnv = 1, // aws env + kDefaultEnv = 0, // posix env + kAwsEnv = 1, // aws env kEndEnv = 2, }; int option_env_;