You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deduplicate test-fixture boilerplate in post-Batch-C writer+pool setup #126
After Batch C Task 7, every writer+pool test fixture follows the same shape:
```rust
struct NoopBus; // or NullBus — both equivalent
impl EventBus for NoopBus {
fn emit(&self, _: &FileEvent) -> Result<(), CoreError> { Ok(()) }
}
let td = tempfile::tempdir().expect("tempdir");
let db_path = td.path().join("test.db");
let bus: Arc = Arc::new(NoopBus);
let writer = SqliteWriter::start(&db_path, bus).expect("writer start");
let reads = ReadPool::open(&db_path).expect("pool open");
```
This appears at least 13 times across the workspace:
A `perima_app::testing` module gated on `#[cfg(test)]` with `NoopBus` + `test_writer_pool(db_path: &Path) -> (SqliteWriterHandle, ReadPool)` helper.
Or a `perima_db::testing` submodule exposing the same.
Also the `fts_matches_ground_truth_under_soft_delete_churn` proptest destructures `let (_td, db, _repo, _writer) = test_db();` but never uses `_repo` — a dedicated `test_db_raw()` would avoid constructing an unused `SqliteSearchRepository` per case.
Acceptance
`rg 'impl EventBus for NoopBus' crates/` returns ≤1 hit.
New `#[cfg(test)]` tests use the shared helper; existing tests migrated.
Activity
test(desktop): ignore 3 _inner tests deadlocking via SQLite #131
test: scope SQLite-deadlock workarounds to the still-affected surface