diff --git a/db/db_table_properties_test.cc b/db/db_table_properties_test.cc index 4501eb4dc..de2ace0d2 100644 --- a/db/db_table_properties_test.cc +++ b/db/db_table_properties_test.cc @@ -138,14 +138,14 @@ TEST_F(DBTablePropertiesTest, GetPropertiesOfTablesInRange) { Options options; options.create_if_missing = true; options.write_buffer_size = 4096; - options.max_write_buffer_number = 8; + options.max_write_buffer_number = 3; options.level0_file_num_compaction_trigger = 2; options.level0_slowdown_writes_trigger = 2; options.level0_stop_writes_trigger = 4; options.target_file_size_base = 2048; options.max_bytes_for_level_base = 10240; options.max_bytes_for_level_multiplier = 4; - options.soft_rate_limit = 1.1; + options.hard_pending_compaction_bytes_limit = 16 * 1024; options.num_levels = 8; DestroyAndReopen(options); @@ -155,6 +155,12 @@ TEST_F(DBTablePropertiesTest, GetPropertiesOfTablesInRange) { ASSERT_OK(Put(test::RandomKey(&rnd, 5), RandomString(&rnd, 102))); } Flush(); + dbfull()->TEST_WaitForCompact(); + if (NumTableFilesAtLevel(0) == 0) { + ASSERT_OK(Put(test::RandomKey(&rnd, 5), RandomString(&rnd, 102))); + Flush(); + } + db_->PauseBackgroundWork(); // Ensure that we have at least L0, L1 and L2