MCPcopy Create free account
hub / github.com/cosdata/cosdata / test_durability

Function test_durability

src/models/durable_wal.rs:337–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335
336 #[test]
337 fn test_durability() {
338 let dir = tempdir().unwrap();
339 let version = 0;
340 let id = VectorId::from("test_id".to_string());
341
342 {
343 let mut wal = DurableWALFile::new(dir.path(), VersionNumber::from(version)).unwrap();
344 wal.append(VectorOp::Delete(id.clone())).unwrap();
345 // No explicit flush, but append should flush
346 }
347
348 // Reopen should still see the data
349 let wal = WALFile::from_existing(dir.path(), VersionNumber::from(version));
350 assert!(wal.is_ok());
351 }
352}

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected