DBTest.DelayedWriteRate: fix assert of sign and unsign comparison

Summary: DBTest.DelayedWriteRate has sign and unsign comparisons that break Windows build. Fix it.

Test Plan: Build and run the test modified.

Reviewers: IslamAbdelRahman, rven, anthony, yhchiang, kradhakrishnan

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D52311
main
sdong 9 years ago
parent 3280ae9a29
commit d43da8ae0d
  1. 6
      db/db_test.cc

@ -9097,8 +9097,10 @@ TEST_F(DBTest, DelayedWriteRate) {
cur_rate /= kSlowdownRatio * kSlowdownRatio; cur_rate /= kSlowdownRatio * kSlowdownRatio;
} }
// Estimate the total sleep time fall into the rough range. // Estimate the total sleep time fall into the rough range.
ASSERT_GT(env_->addon_time_.load(), estimated_sleep_time / 2); ASSERT_GT(env_->addon_time_.load(),
ASSERT_LT(env_->addon_time_.load(), estimated_sleep_time * 2); static_cast<int64_t>(estimated_sleep_time / 2));
ASSERT_LT(env_->addon_time_.load(),
static_cast<int64_t>(estimated_sleep_time * 2));
env_->no_sleep_ = false; env_->no_sleep_ = false;
rocksdb::SyncPoint::GetInstance()->DisableProcessing(); rocksdb::SyncPoint::GetInstance()->DisableProcessing();

Loading…
Cancel
Save