From 249e796dfcce77d753704fa6b6ab0b2a69f44fb7 Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 13 Jun 2016 15:00:02 -0700 Subject: [PATCH] Fix Flaky DBCompactionTest.SkipStatsUpdateTest Summary: DBCompactionTest.SkipStatsUpdateTest sometimes fails. I don't see any verification related to the deletes issued. Remove them to avoid the uncertainty. Test Plan: Run the test. Reviewers: IslamAbdelRahman, andrewkr, yhchiang Reviewed By: yhchiang Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D59613 --- db/db_compaction_test.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/db/db_compaction_test.cc b/db/db_compaction_test.cc index ada936a87b..3f2d720235 100644 --- a/db/db_compaction_test.cc +++ b/db/db_compaction_test.cc @@ -212,8 +212,8 @@ TEST_P(DBCompactionTestWithParam, CompactionDeletionTrigger) { } TEST_F(DBCompactionTest, SkipStatsUpdateTest) { - // This test verify UpdateAccumulatedStats is not on by observing - // the compaction behavior when there are many of deletion entries. + // This test verify UpdateAccumulatedStats is not on + // if options.skip_stats_update_on_db_open = true // The test will need to be updated if the internal behavior changes. Options options = DeletionTriggerOptions(CurrentOptions()); @@ -230,10 +230,6 @@ TEST_F(DBCompactionTest, SkipStatsUpdateTest) { dbfull()->TEST_WaitForFlushMemTable(); dbfull()->TEST_WaitForCompact(); - for (int k = 0; k < kTestSize; ++k) { - ASSERT_OK(Delete(Key(k))); - } - // Reopen the DB with stats-update disabled options.skip_stats_update_on_db_open = true; env_->random_file_open_counter_.store(0);