(root: &Path)
| 114 | } |
| 115 | |
| 116 | fn journal_records(root: &Path) -> Vec<Value> { |
| 117 | let content = match fs::read_to_string(journal_path(root)) { |
| 118 | Ok(content) => content, |
| 119 | Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Vec::new(), |
| 120 | Err(error) => panic!("read journal: {error}"), |
| 121 | }; |
| 122 | content |
| 123 | .lines() |
| 124 | .map(|line| serde_json::from_str(line).expect("JSONL record")) |
| 125 | .collect() |
| 126 | } |
| 127 | |
| 128 | fn wait_for_deferred_receipt(root: &Path, minimum_checkout_events: usize) -> Vec<Value> { |
| 129 | let deadline = Instant::now() + Duration::from_secs(10); |
no test coverage detected