diff --git a/db/db_sst_test.cc b/db/db_sst_test.cc index 07109c663..640b4f5a2 100644 --- a/db/db_sst_test.cc +++ b/db/db_sst_test.cc @@ -561,6 +561,7 @@ TEST_F(DBSSTTest, DBWithSstFileManagerForBlobFilesWithGC) { constexpr Slice* end = nullptr; ASSERT_OK(db_->CompactRange(CompactRangeOptions(), begin, end)); + sfm->WaitForEmptyTrash(); ASSERT_EQ(Get(first_key), first_value); ASSERT_EQ(Get(second_key), second_value); @@ -593,6 +594,7 @@ TEST_F(DBSSTTest, DBWithSstFileManagerForBlobFilesWithGC) { Close(); ASSERT_OK(DestroyDB(dbname_, options)); + sfm->WaitForEmptyTrash(); ASSERT_EQ(files_deleted, 5); ASSERT_EQ(files_scheduled_to_delete, 5);