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
This commit is contained in:
sdong 2015-12-23 22:33:40 -08:00
parent 3280ae9a29
commit d43da8ae0d

View File

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