()
| 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() { |
nothing calls this directly
no test coverage detected