MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / panics_on_partial_write

Function panics_on_partial_write

crates/commitlog/src/tests/partial.rs:23–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21#[test]
22#[should_panic(expected = "failed to flush segment")]
23fn panics_on_partial_write() {
24 enable_logging();
25
26 let mut log = open_log::<[u8; 32]>(ShortMem::new(800));
27 for i in 0..20 {
28 info!("commit {i}");
29 log.commit([(i, [b'z'; 32])]).expect("unexpected `Err` result");
30 }
31}
32
33fn fill_log(mut log: commitlog::Generic<ShortMem, [u8; 32]>, range: Range<TxOffset>) {
34 debug!("writing range {range:?}");

Callers

nothing calls this directly

Calls 3

enable_loggingFunction · 0.70
commitMethod · 0.65
newFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…