()
| 50 | |
| 51 | #[test] |
| 52 | fn reader_open_advises_sequential() { |
| 53 | let dir = tempdir().unwrap(); |
| 54 | let wal_dir = dir.path(); |
| 55 | write_n_records(wal_dir, 1); |
| 56 | |
| 57 | let segs = nodedb_wal::segment::discover_segments(wal_dir).unwrap(); |
| 58 | let reader = MmapWalReader::open(&segs[0].path).unwrap(); |
| 59 | |
| 60 | assert_eq!( |
| 61 | reader.madvise_state(), |
| 62 | Some(libc::MADV_SEQUENTIAL), |
| 63 | "MmapWalReader::open must advise MADV_SEQUENTIAL" |
| 64 | ); |
| 65 | } |
| 66 | |
| 67 | #[test] |
| 68 | fn replay_limit_from_last_segment_opens_only_last_segment() { |
nothing calls this directly
no test coverage detected