()
| 326 | |
| 327 | #[test] |
| 328 | fn read_from_lsn_with_limit() { |
| 329 | let buf = StreamBuffer::new("test".into(), RetentionConfig::default()); |
| 330 | |
| 331 | for i in 1..=10 { |
| 332 | buf.push(make_event(i, i * 10)); |
| 333 | } |
| 334 | |
| 335 | let events = buf.read_from_lsn(0, 3); |
| 336 | assert_eq!(events.len(), 3); |
| 337 | assert_eq!(events[0].lsn, 10); |
| 338 | assert_eq!(events[2].lsn, 30); |
| 339 | } |
| 340 | |
| 341 | fn make_event_on_partition(seq: u64, partition: u32, lsn: u64) -> CdcEvent { |
| 342 | let mut e = make_event(seq, lsn); |
nothing calls this directly
no test coverage detected