Skip to content

Commit b6fdfe8

Browse files
author
Mathieu Baudet
committed
test_utils: scan the empty prefix in run_reads
Align run_reads with `main`: iterate prefixes of length 0..=len (was 1..=len) so the empty-prefix scan is exercised. This covers `find_keys_by_prefix(&[])` against the exclusive ScyllaDB store, which must not surface the timestamp sentinel row.
1 parent 10cc27c commit b6fdfe8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • linera-views/src/test_utils

linera-views/src/test_utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub async fn run_reads<S: KeyValueStore>(store: S, key_values: Vec<(Vec<u8>, Vec
176176
store.write_batch(batch).await.unwrap();
177177
for key_prefix in keys
178178
.iter()
179-
.flat_map(|key| (0..key.len()).map(|u| &key[..=u]))
179+
.flat_map(|key| (0..=key.len()).map(|u| &key[..u]))
180180
{
181181
// Getting the find_keys_by_prefix / find_key_values_by_prefix
182182
let len_prefix = key_prefix.len();

0 commit comments

Comments
 (0)