Assert that a KV key is absent (NotFound or empty payload).
(
core: &mut CoreLoop,
tx: &mut Producer<BridgeRequest>,
rx: &mut Consumer<BridgeResponse>,
key: &[u8],
)
| 295 | |
| 296 | /// Assert that a KV key is absent (NotFound or empty payload). |
| 297 | pub fn assert_kv_absent( |
| 298 | core: &mut CoreLoop, |
| 299 | tx: &mut Producer<BridgeRequest>, |
| 300 | rx: &mut Consumer<BridgeResponse>, |
| 301 | key: &[u8], |
| 302 | ) { |
| 303 | let r = send_raw(core, tx, rx, kv_get(key)); |
| 304 | let is_absent = r.status == Status::Error || r.payload.is_empty(); |
| 305 | assert!( |
| 306 | is_absent, |
| 307 | "KV key {key:?} must be absent after rollback; status={:?} payload_len={}", |
| 308 | r.status, |
| 309 | r.payload.len() |
| 310 | ); |
| 311 | } |
| 312 | |
| 313 | /// Assert that a document is absent (NotFound or empty payload). |
| 314 | pub fn assert_doc_absent( |