From ae5f742df703182cfc8aad3c960da57fc4499c8c Mon Sep 17 00:00:00 2001 From: Yuval Ariel Date: Fri, 11 Nov 2022 12:26:03 +0200 Subject: [PATCH] db_test2: fix BackgroundPurgeTest (#236) fix by adding WaitUntilSleeping before deleting the iterator --- db/db_test2.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/db_test2.cc b/db/db_test2.cc index 14eb02bdcb..c39de85e84 100644 --- a/db/db_test2.cc +++ b/db/db_test2.cc @@ -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);