From f681030c80b201f87eb3127637cfe2783c0c6c22 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 20 Mar 2014 09:52:38 -0700 Subject: [PATCH] Fix DBTest.UniversalCompactionTrigger failure caused by D17067 Summary: D17067 breaks DBTest.UniversalCompactionTrigger because of wrong location of the checking. Fix it. Test Plan: Run the test and make sure it passes. Reviewers: igor, haobo Reviewed By: igor CC: dhruba, ljin, yhchiang, leveldb Differential Revision: https://reviews.facebook.net/D17079 --- db/db_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_test.cc b/db/db_test.cc index d240e41e5..92f6ab840 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -2511,7 +2511,6 @@ TEST(DBTest, UniversalCompactionTrigger) { // Generate one more file at level-0, which should trigger level-0 // compaction. - filter->expect_full_compaction_.store(false); for (int i = 0; i < 11; i++) { ASSERT_OK(Put(Key(key_idx), RandomString(&rnd, 10000))); key_idx++; @@ -2532,6 +2531,7 @@ TEST(DBTest, UniversalCompactionTrigger) { // First, clean up memtable before inserting new data. This will generate // a level-0 file, with size around 0.4 (according to previously written // data amount). + filter->expect_full_compaction_.store(false); dbfull()->Flush(FlushOptions()); for (int num = 0; num < options.level0_file_num_compaction_trigger-3;