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 authored and udi-speedb committed Nov 15, 2023
1 parent c6e1c40 commit 283c595
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 @@ -5761,6 +5761,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 283c595

Please sign in to comment.