()
| 10 | use std::time::{Duration, Instant}; |
| 11 | |
| 12 | fn make_core() -> ( |
| 13 | CoreLoop, |
| 14 | Producer<BridgeRequest>, |
| 15 | Consumer<BridgeResponse>, |
| 16 | tempfile::TempDir, |
| 17 | ) { |
| 18 | let dir = tempfile::tempdir().unwrap(); |
| 19 | let (req_tx, req_rx) = RingBuffer::channel::<BridgeRequest>(64); |
| 20 | let (resp_tx, resp_rx) = RingBuffer::channel::<BridgeResponse>(64); |
| 21 | let core = CoreLoop::open( |
| 22 | 0, |
| 23 | req_rx, |
| 24 | resp_tx, |
| 25 | dir.path(), |
| 26 | std::sync::Arc::new(nodedb_types::OrdinalClock::new()), |
| 27 | ) |
| 28 | .unwrap(); |
| 29 | (core, req_tx, resp_rx, dir) |
| 30 | } |
| 31 | |
| 32 | pub fn make_core_with_dir( |
| 33 | dir: &std::path::Path, |
no test coverage detected