Skip to main content

open_test_db_with_hlc

Function open_test_db_with_hlc 

Source
pub fn open_test_db_with_hlc(
    store_dir: StoreDir,
    hlc: Arc<Hlc>,
    seed: impl for<'connection> Fn(&MigrationContext<'connection>) -> Result<(), DbError> + Send + Sync + 'static,
) -> Database
Expand description

Open a test Database over the synthetic schema with a caller-supplied register clock (so a test can control the wall clock), plus an extra seed step run after the host schema is created to plant host rows before Database::open reads its floor.

Used only by the register-clock tests (hlc_register_tests).