MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / replay_from_limit_empty

Function replay_from_limit_empty

nodedb-wal/src/segmented.rs:776–788  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

774
775 #[test]
776 fn replay_from_limit_empty() {
777 let dir = tempfile::tempdir().unwrap();
778 let config = test_config(dir.path());
779 let mut wal = SegmentedWal::open(config).unwrap();
780
781 wal.append(RecordType::Put as u32, 1, 0, 0, b"a").unwrap();
782 wal.sync().unwrap();
783
784 // Start from beyond all records.
785 let (records, has_more) = wal.replay_from_limit(999, 100).unwrap();
786 assert!(records.is_empty());
787 assert!(!has_more);
788 }
789
790 #[test]
791 fn replay_from_limit_across_segments() {

Callers

nothing calls this directly

Calls 6

test_configFunction · 0.70
openFunction · 0.50
pathMethod · 0.45
appendMethod · 0.45
syncMethod · 0.45
replay_from_limitMethod · 0.45

Tested by

no test coverage detected