Skip to content

Commit

Permalink
Supplement extra cases for ut.
Browse files Browse the repository at this point in the history
Signed-off-by: lucasliang <[email protected]>
  • Loading branch information
LykxSassinator committed Jan 15, 2025
1 parent 3cfe314 commit b565928
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utilities/rate_limiters/write_amp_based_rate_limiter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ TEST_F(WriteAmpBasedRateLimiterTest, AutoTune) {
limiter.Request(1000 /* bytes */, Env::IO_LOW, nullptr /* stats */,
RateLimiter::OpType::kWrite);
ASSERT_EQ(10000, limiter.GetBytesPerSecond());
// After recovering, the auto-tune works normally.
for (auto i = 1; i <= 3; i++) {
thread_env->SleepForMicroseconds(1000 * 1000);
limiter.Request(1000 /* bytes */, Env::IO_LOW, nullptr /* stats */,
RateLimiter::OpType::kWrite);
ASSERT_EQ(10485760, limiter.GetBytesPerSecond());
}
// TODO: add more logic for auto-tune
}

Expand Down

0 comments on commit b565928

Please sign in to comment.