Skip to content

Commit

Permalink
db_test2: fix BackgroundPurgeTest (#236)
Browse files Browse the repository at this point in the history
fix by adding WaitUntilSleeping before deleting the iterator
  • Loading branch information
Yuval-Ariel committed Nov 25, 2022
1 parent bd934c0 commit ae5f742
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions db/db_test2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5942,6 +5942,7 @@ TEST_F(DBTest2, BackgroundPurgeTest) {
test::SleepingBackgroundTask sleeping_task_after;
db_->GetEnv()->Schedule(&test::SleepingBackgroundTask::DoSleepTask,
&sleeping_task_after, Env::Priority::LOW);
sleeping_task_after.WaitUntilSleeping();
delete iter;

Env::Default()->SleepForMicroseconds(100000);
Expand Down

0 comments on commit ae5f742

Please sign in to comment.