()
| 162 | |
| 163 | #[test] |
| 164 | fn drain_for_partition() { |
| 165 | let mut buf = O3Buffer::new(100); |
| 166 | buf.insert(make_row(100, 1, 0)); |
| 167 | buf.insert(make_row(200, 1, 86_400_000)); |
| 168 | buf.insert(make_row(300, 2, 0)); |
| 169 | assert_eq!(buf.len(), 3); |
| 170 | |
| 171 | let drained = buf.drain_for_partition(0); |
| 172 | assert_eq!(drained.len(), 2); |
| 173 | assert_eq!(buf.len(), 1); |
| 174 | // Drained should be sorted by timestamp. |
| 175 | assert_eq!(drained[0].timestamp_ms, 100); |
| 176 | assert_eq!(drained[1].timestamp_ms, 300); |
| 177 | } |
| 178 | |
| 179 | #[test] |
| 180 | fn dedup_last_write_wins() { |
nothing calls this directly
no test coverage detected