pub mod action_ledger;
pub mod approval_service;
pub mod approval_store;
pub mod audit_log_store;
pub mod consent_store;
pub mod governance_state_store;
pub mod lease_store;
pub mod queue_source;
pub mod run_store;
pub mod schedule_store;
pub mod spend_ledger;
pub mod subject_data_store;
pub mod subject_registry;
pub use action_ledger::ActionLedgerHarness;
pub use approval_store::ApprovalStoreHarness;
pub use audit_log_store::AuditLogStoreHarness;
pub use consent_store::ConsentStoreHarness;
pub use governance_state_store::GovernanceStateStoreHarness;
pub use lease_store::LeaseStoreHarness;
pub use queue_source::QueueSourceHarness;
pub use run_store::RunStoreHarness;
pub use schedule_store::ScheduleStoreHarness;
pub use spend_ledger::{SpendLedgerHarness, SpendLedgerSetup};
pub use subject_data_store::SubjectDataStoreHarness;
pub use subject_registry::SubjectRegistryHarness;
fn unique(prefix: &str) -> String {
format!("conformance:{prefix}/{}", uuid::Uuid::new_v4())
}
fn unique_unicode(prefix: &str) -> String {
format!("conformance:{prefix}/ü-日本/{}", uuid::Uuid::new_v4())
}
fn base_time() -> chrono::DateTime<chrono::Utc> {
use chrono::TimeZone;
chrono::Utc.with_ymd_and_hms(2026, 10, 15, 12, 0, 0).single().expect("valid instant")
}
#[macro_export]
macro_rules! spend_ledger_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_reserve_commit_release_accounting() {
$crate::conformance::spend_ledger::reserve_commit_release_accounting(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_settles_each_reservation_once() {
$crate::conformance::spend_ledger::settles_each_reservation_once(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_limits_apply_per_key() {
$crate::conformance::spend_ledger::limits_apply_per_key(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_periods_roll_over_at_utc_boundaries() {
$crate::conformance::spend_ledger::periods_roll_over_at_utc_boundaries(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_expired_reservations_stop_holding_budget() {
$crate::conformance::spend_ledger::expired_reservations_stop_holding_budget(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_concurrent_reservations_never_exceed_a_cap() {
$crate::conformance::spend_ledger::concurrent_reservations_never_exceed_a_cap(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_reservations_survive_a_restart() {
$crate::conformance::spend_ledger::reservations_survive_a_restart(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn spend_unbounded_holds_need_an_uncapped_key() {
$crate::conformance::spend_ledger::unbounded_holds_need_an_uncapped_key(&$harness)
.await;
}
};
}
#[macro_export]
macro_rules! action_ledger_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn action_begin_complete_round_trip() {
$crate::conformance::action_ledger::begin_complete_round_trip(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn action_recorded_call_is_answered_without_executing() {
$crate::conformance::action_ledger::recorded_call_is_answered_without_executing(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn action_incomplete_call_is_outcome_unknown_after_restart() {
$crate::conformance::action_ledger::incomplete_call_is_outcome_unknown_after_restart(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn action_concurrent_begin_has_one_winner() {
$crate::conformance::action_ledger::concurrent_begin_has_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn action_outcomes_are_write_once() {
$crate::conformance::action_ledger::outcomes_are_write_once(&$harness).await;
}
};
}
#[macro_export]
macro_rules! approval_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_pending_requests_are_kept_once_oldest_first() {
$crate::conformance::approval_store::pending_requests_are_kept_once_oldest_first(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_decision_is_consumed_once() {
$crate::conformance::approval_store::decision_is_consumed_once(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_later_decision_replaces_earlier() {
$crate::conformance::approval_store::later_decision_replaces_earlier(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_expired_decisions_are_discarded() {
$crate::conformance::approval_store::expired_decisions_are_discarded(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_decisions_stay_in_their_scope() {
$crate::conformance::approval_store::decisions_stay_in_their_scope(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_decisions_stay_with_their_agent_and_tool() {
$crate::conformance::approval_store::decisions_stay_with_their_agent_and_tool(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_concurrent_take_has_one_winner() {
$crate::conformance::approval_store::concurrent_take_has_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_records_survive_a_restart() {
$crate::conformance::approval_store::records_survive_a_restart(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_decisions_carry_edits_and_messages() {
$crate::conformance::approval_store::decisions_carry_edits_and_messages(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_requests_are_created_once() {
$crate::conformance::approval_store::requests_are_created_once(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_concurrent_replace_has_one_winner() {
$crate::conformance::approval_store::concurrent_replace_has_one_winner(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_requests_list_in_order_with_filters() {
$crate::conformance::approval_store::requests_list_in_order_with_filters(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_requests_list_by_session() {
$crate::conformance::approval_store::requests_list_by_session(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_delegations_round_trip() {
$crate::conformance::approval_store::delegations_round_trip(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_requests_survive_a_restart() {
$crate::conformance::approval_store::approval_requests_survive_a_restart(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_evidence_round_trips() {
$crate::conformance::approval_store::evidence_round_trips(&$harness).await;
}
};
}
#[macro_export]
macro_rules! approval_service_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_expiry_denies_the_call() {
$crate::conformance::approval_service::expiry_denies_the_call(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_quorum_needs_distinct_approvers() {
$crate::conformance::approval_service::quorum_needs_distinct_approvers(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_self_approval_is_refused() {
$crate::conformance::approval_service::self_approval_is_refused(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_delegation_applies_only_in_its_window() {
$crate::conformance::approval_service::delegation_applies_only_in_its_window(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_concurrent_decide_has_one_winner() {
$crate::conformance::approval_service::concurrent_decide_has_one_winner(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_edit_substitutes_arguments() {
$crate::conformance::approval_service::edit_substitutes_arguments(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_escalation_fires_once() {
$crate::conformance::approval_service::escalation_fires_once(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_inbox_lists_what_an_approver_may_decide() {
$crate::conformance::approval_service::inbox_lists_what_an_approver_may_decide(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_inbox_lists_one_session() {
$crate::conformance::approval_service::inbox_lists_one_session(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_a_call_held_again_keeps_its_open_request() {
$crate::conformance::approval_service::a_call_held_again_keeps_its_open_request(
&$harness,
)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_cancel_and_reject_deny_the_call() {
$crate::conformance::approval_service::cancel_and_reject_deny_the_call(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_requests_survive_a_restart() {
$crate::conformance::approval_service::requests_survive_a_restart(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_slots_need_distinct_approvers() {
$crate::conformance::approval_service::slots_need_distinct_approvers(&$harness)
.await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn approval_service_directory_decides_groups() {
$crate::conformance::approval_service::directory_decides_groups(&$harness).await;
}
};
}
#[macro_export]
macro_rules! lease_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn lease_acquire_renew_release() {
$crate::conformance::lease_store::acquire_renew_release(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn lease_concurrent_acquire_has_one_winner() {
$crate::conformance::lease_store::concurrent_acquire_has_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn lease_expiry_takeover_bumps_epoch() {
$crate::conformance::lease_store::expiry_takeover_bumps_epoch(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn lease_stale_renew_and_release_are_refused() {
$crate::conformance::lease_store::stale_renew_and_release_are_refused(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn lease_leases_survive_a_restart() {
$crate::conformance::lease_store::leases_survive_a_restart(&$harness).await;
}
};
}
#[macro_export]
macro_rules! run_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_enqueue_claim_finish_round_trip() {
$crate::conformance::run_store::enqueue_claim_finish_round_trip(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_idempotent_enqueue_under_concurrency() {
$crate::conformance::run_store::idempotent_enqueue_under_concurrency(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_on_conflict_policies() {
$crate::conformance::run_store::on_conflict_policies(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_concurrent_claims_have_one_winner() {
$crate::conformance::run_store::concurrent_claims_have_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_not_before_is_respected() {
$crate::conformance::run_store::not_before_is_respected(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_expired_lease_recovery() {
$crate::conformance::run_store::expired_lease_recovery(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_stale_epoch_writes_are_refused() {
$crate::conformance::run_store::stale_epoch_writes_are_refused(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_retryable_failure_requeues_until_max_attempts() {
$crate::conformance::run_store::retryable_failure_requeues_until_max_attempts(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_wait_and_wake() {
$crate::conformance::run_store::wait_and_wake(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_parked_run_keeps_its_checkpoint() {
$crate::conformance::run_store::parked_run_keeps_its_checkpoint(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_freeze_parked_runs_wake_only_when_woken() {
$crate::conformance::run_store::freeze_parked_runs_wake_only_when_woken(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_cancel_is_visible_through_heartbeat() {
$crate::conformance::run_store::cancel_is_visible_through_heartbeat(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_prune_removes_old_finished_runs() {
$crate::conformance::run_store::prune_removes_old_finished_runs(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn run_runs_survive_a_restart() {
$crate::conformance::run_store::runs_survive_a_restart(&$harness).await;
}
};
}
#[macro_export]
macro_rules! schedule_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn schedule_upsert_is_idempotent() {
$crate::conformance::schedule_store::upsert_is_idempotent(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn schedule_due_orders_by_fire_time() {
$crate::conformance::schedule_store::due_orders_by_fire_time(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn schedule_advance_has_one_winner() {
$crate::conformance::schedule_store::advance_has_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn schedule_paused_schedules_are_not_due() {
$crate::conformance::schedule_store::paused_schedules_are_not_due(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn schedule_schedules_survive_a_restart() {
$crate::conformance::schedule_store::schedules_survive_a_restart(&$harness).await;
}
};
}
#[macro_export]
macro_rules! governance_state_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn governance_set_get_list_round_trip() {
$crate::conformance::governance_state_store::set_get_list_round_trip(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn governance_concurrent_set_has_one_winner() {
$crate::conformance::governance_state_store::concurrent_set_has_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn governance_scopes_are_independent() {
$crate::conformance::governance_state_store::scopes_are_independent(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn governance_states_survive_a_restart() {
$crate::conformance::governance_state_store::states_survive_a_restart(&$harness).await;
}
};
}
#[macro_export]
macro_rules! audit_log_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_append_assigns_contiguous_sequences() {
$crate::conformance::audit_log_store::append_assigns_contiguous_sequences(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_append_refuses_a_wrong_start() {
$crate::conformance::audit_log_store::append_refuses_a_wrong_start(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_append_refuses_invalid_batches() {
$crate::conformance::audit_log_store::append_refuses_invalid_batches(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_concurrent_appends_have_one_winner() {
$crate::conformance::audit_log_store::concurrent_appends_have_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_logs_are_independent() {
$crate::conformance::audit_log_store::logs_are_independent(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_logs_sort_by_bytes() {
$crate::conformance::audit_log_store::logs_sort_by_bytes(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_hash_at_returns_leaves_and_nodes() {
$crate::conformance::audit_log_store::hash_at_returns_leaves_and_nodes(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_reads_past_the_end_fail() {
$crate::conformance::audit_log_store::reads_past_the_end_fail(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_checkpoints_never_fork() {
$crate::conformance::audit_log_store::checkpoints_never_fork(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_prune_keeps_hashes() {
$crate::conformance::audit_log_store::prune_keeps_hashes(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_redaction_keeps_hashes() {
$crate::conformance::audit_log_store::redaction_keeps_hashes(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn audit_log_logs_survive_a_restart() {
$crate::conformance::audit_log_store::logs_survive_a_restart(&$harness).await;
}
};
}
#[macro_export]
macro_rules! queue_source_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn queue_pull_leases_and_ack_removes() {
$crate::conformance::queue_source::pull_leases_and_ack_removes(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn queue_nack_redelivers_with_a_new_receipt() {
$crate::conformance::queue_source::nack_redelivers_with_a_new_receipt(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn queue_lapsed_lease_redelivers() {
$crate::conformance::queue_source::lapsed_lease_redelivers(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn queue_pull_respects_the_batch_size() {
$crate::conformance::queue_source::pull_respects_the_batch_size(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn queue_duplicate_publishes_are_both_delivered() {
$crate::conformance::queue_source::duplicate_publishes_are_both_delivered(&$harness)
.await;
}
};
}
#[macro_export]
macro_rules! subject_registry_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_ensure_registers_once() {
$crate::conformance::subject_registry::ensure_registers_once(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_concurrent_ensure_has_one_pseudonym() {
$crate::conformance::subject_registry::concurrent_ensure_has_one_pseudonym(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_pseudonyms_resolve() {
$crate::conformance::subject_registry::pseudonyms_resolve(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_links_once_per_visitor() {
$crate::conformance::subject_registry::links_once_per_visitor(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_concurrent_links_have_one_winner() {
$crate::conformance::subject_registry::concurrent_links_have_one_winner(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_erasing_blocks_links() {
$crate::conformance::subject_registry::erasing_blocks_links(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn registry_remove_forgets_the_subject() {
$crate::conformance::subject_registry::remove_forgets_the_subject(&$harness).await;
}
};
}
#[macro_export]
macro_rules! consent_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_grant_get_round_trip() {
$crate::conformance::consent_store::grant_get_round_trip(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_records_are_per_subject() {
$crate::conformance::consent_store::records_are_per_subject(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_revocation_keeps_the_first_time() {
$crate::conformance::consent_store::revocation_keeps_the_first_time(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_revoke_purpose_revokes_live_records() {
$crate::conformance::consent_store::revoke_purpose_revokes_live_records(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_live_respects_expiry_and_revocation() {
$crate::conformance::consent_store::live_respects_expiry_and_revocation(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn consent_erase_removes_one_subject() {
$crate::conformance::consent_store::erase_removes_one_subject(&$harness).await;
}
};
}
#[macro_export]
macro_rules! subject_data_store_conformance_tests {
($(#[$attr:meta])* harness = $harness:expr $(,)?) => {
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn subject_data_export_returns_only_the_subject() {
$crate::conformance::subject_data_store::export_returns_only_the_subject(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn subject_data_erase_removes_only_the_subject() {
$crate::conformance::subject_data_store::erase_removes_only_the_subject(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn subject_data_erase_is_idempotent() {
$crate::conformance::subject_data_store::erase_is_idempotent(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn subject_data_erase_covers_linked_ids() {
$crate::conformance::subject_data_store::erase_covers_linked_ids(&$harness).await;
}
$(#[$attr])*
#[::tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn subject_data_erase_stays_in_its_applications() {
$crate::conformance::subject_data_store::erase_stays_in_its_applications(&$harness).await;
}
};
}