Registry testing - part 9

This commit is contained in:
Maurus Decimus
2026-03-19 19:29:17 +01:00
parent 7ae6654735
commit a67921f18c
57 changed files with 2886 additions and 1312 deletions

View File

@@ -140,10 +140,6 @@ async fn destroy_account(server: &Server, task: &TaskDestroyAccount) -> trc::Res
SearchIndex::Contacts,
SearchIndex::Calendar,
] {
let c = println!(
"Unindexing search index {:?} for account {}",
index, account_id
);
server
.search_store()
.unindex(SearchQuery::new(index).with_account_id(account_id))

View File

@@ -37,7 +37,7 @@ use registry::{
use smtp::reporting::index::ExternalReportIndex;
use store::{
Serialize, ValueKey,
rand::{self, Rng},
rand::{self},
registry::{RegistryFilter, RegistryQuery},
roaring::RoaringBitmap,
write::{AlignedBytes, Archive, Archiver, BatchBuilder, RegistryClass, ValueClass, now},
@@ -106,10 +106,17 @@ async fn store_maintenance(
.query::<RoaringBitmap>(RegistryQuery::new(ObjectType::Account))
.await?
{
#[cfg(feature = "test_mode")]
let status = TaskStatus::at(now);
#[cfg(not(feature = "test_mode"))]
let status =
TaskStatus::at(now + rand::Rng::random_range(&mut rand::rng(), 0..=300));
batch.schedule_task(Task::AccountMaintenance(TaskAccountMaintenance {
account_id: account_id.into(),
maintenance_type,
status: TaskStatus::at(now + rand::rng().random_range(0..=300)),
status,
}));
if batch.is_large_batch() {