Fix undeterministic failure of DBTest.GetPropertiesOfAllTablesTest

Summary: DBTest.GetPropertiesOfAllTablesTest generates four files and expects four files there, but a L0->L1 comapction can trigger to compact to one single file. Fix it by raising level 0 number of file compaction trigger

Test Plan: Run it many times and see it never fails.

Reviewers: kradhakrishnan, IslamAbdelRahman, yhchiang, anthony

Reviewed By: anthony

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D42789
This commit is contained in:
sdong 2015-07-21 17:04:00 -07:00
parent 3dbf4ba220
commit 02b635fa38

View File

@ -420,7 +420,7 @@ TEST_F(DBTest, ParanoidFileChecks) {
TEST_F(DBTest, GetPropertiesOfAllTablesTest) { TEST_F(DBTest, GetPropertiesOfAllTablesTest) {
Options options = CurrentOptions(); Options options = CurrentOptions();
options.max_background_flushes = 0; options.level0_file_num_compaction_trigger = 8;
Reopen(options); Reopen(options);
// Create 4 tables // Create 4 tables
for (int table = 0; table < 4; ++table) { for (int table = 0; table < 4; ++table) {