()
| 32 | |
| 33 | #[test] |
| 34 | fn stream_buffer_retention_evicts_oldest() { |
| 35 | let retention = RetentionConfig { |
| 36 | max_events: 3, |
| 37 | max_age_secs: 86_400, |
| 38 | }; |
| 39 | let buf = StreamBuffer::new("orders_stream".to_string(), retention); |
| 40 | |
| 41 | for i in 1..=5 { |
| 42 | buf.push(make_cdc_event(i, 0, "orders", "INSERT")); |
| 43 | } |
| 44 | |
| 45 | let events = buf.read_from_lsn(0, 100); |
| 46 | assert_eq!(events.len(), 3); |
| 47 | // Oldest (seq 1, 2) evicted; remaining are 3, 4, 5. |
| 48 | assert_eq!(events[0].sequence, 3); |
| 49 | } |
| 50 | |
| 51 | #[test] |
| 52 | fn consumer_group_offset_tracking() { |
nothing calls this directly
no test coverage detected