From d8e3e766f9344f9e386bb8524b204c11fabbb776 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Tue, 7 Jul 2015 14:00:03 -0700 Subject: [PATCH] Fixed a bug in test ThreadStatusSingleCompaction Summary: Fixed a bug in test ThreadStatusSingleCompaction where SyncPoint traces are not cleared before the test begins its second iteration. Test Plan: db_test Reviewers: sdong, anthony, IslamAbdelRahman, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D41337 --- db/db_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/db_test.cc b/db/db_test.cc index cb919c09f..6ae8f878a 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -11249,10 +11249,10 @@ TEST_F(DBTest, ThreadStatusSingleCompaction) { {"CompactionJob::Run():Start", "DBTest::ThreadStatusSingleCompaction:1"}, {"DBTest::ThreadStatusSingleCompaction:2", "CompactionJob::Run():End"}, }); - rocksdb::SyncPoint::GetInstance()->EnableProcessing(); - for (int tests = 0; tests < 2; ++tests) { DestroyAndReopen(options); + rocksdb::SyncPoint::GetInstance()->ClearTrace(); + rocksdb::SyncPoint::GetInstance()->EnableProcessing(); Random rnd(301); // The Put Phase. @@ -11284,8 +11284,8 @@ TEST_F(DBTest, ThreadStatusSingleCompaction) { // repeat the test with disabling thread tracking. options.enable_thread_tracking = false; + rocksdb::SyncPoint::GetInstance()->DisableProcessing(); } - rocksdb::SyncPoint::GetInstance()->DisableProcessing(); } TEST_F(DBTest, PreShutdownManualCompaction) {