This commit is contained in:
bowang 2022-05-16 13:24:33 -07:00
parent 19c4f3af6f
commit b5674ff7f4
3 changed files with 6 additions and 6 deletions

View File

@ -1322,7 +1322,7 @@ TEST_F(CompactionJobTest, ResultSerialization) {
}
}
TEST_F(CompactionJobTest, GetRateLimiterPriority) {
TEST_F(CompactionJobTest, GetRateLimiterPriorityForWrite) {
NewDB();
auto expected_results = CreateTwoFiles(false);

View File

@ -94,7 +94,7 @@ class FlushJob {
#endif // !ROCKSDB_LITE
private:
friend class FlushJobTest_GetRateLimiterPriority_Test;
friend class FlushJobTest_GetRateLimiterPriorityForWrite_Test;
void ReportStartedFlush();
void ReportFlushInputSize(const autovector<MemTable*>& mems);

View File

@ -528,7 +528,7 @@ TEST_F(FlushJobTest, Snapshots) {
job_context.Clean();
}
TEST_F(FlushJobTest, GetRateLimiterPriorityWrite) {
TEST_F(FlushJobTest, GetRateLimiterPriorityForWrite) {
// Prepare a FlushJob that flush MemTables of Single Column Family.
const size_t num_mems = 2;
const size_t num_mems_to_flush = 1;
@ -574,7 +574,7 @@ TEST_F(FlushJobTest, GetRateLimiterPriorityWrite) {
Env::Priority::USER, nullptr /*IOTracer*/);
// When the state from WriteController is normal.
ASSERT_EQ(flush_job.GetRateLimiterPriorityWrite(), Env::IO_HIGH);
ASSERT_EQ(flush_job.GetRateLimiterPriorityForWrite(), Env::IO_HIGH);
WriteController* write_controller =
flush_job.versions_->GetColumnFamilySet()->write_controller();
@ -583,14 +583,14 @@ TEST_F(FlushJobTest, GetRateLimiterPriorityWrite) {
// When the state from WriteController is Delayed.
std::unique_ptr<WriteControllerToken> delay_token =
write_controller->GetDelayToken(1000000);
ASSERT_EQ(flush_job.GetRateLimiterPriorityWrite(), Env::IO_USER);
ASSERT_EQ(flush_job.GetRateLimiterPriorityForWrite(), Env::IO_USER);
}
{
// When the state from WriteController is Stopped.
std::unique_ptr<WriteControllerToken> stop_token =
write_controller->GetStopToken();
ASSERT_EQ(flush_job.GetRateLimiterPriorityWrite(), Env::IO_USER);
ASSERT_EQ(flush_job.GetRateLimiterPriorityForWrite(), Env::IO_USER);
}
}