diff --git a/downstairs/src/region.rs b/downstairs/src/region.rs index 7fe212fc2..aeadb3523 100644 --- a/downstairs/src/region.rs +++ b/downstairs/src/region.rs @@ -2311,12 +2311,11 @@ pub(crate) mod test { .join(extent_file_name(i, ExtentType::Db)) .exists()); } - let read_from_region: Vec = region - .region_read(&requests, JobId(0)) - .await? - .into_iter() - .flat_map(|i| i.data.to_vec()) - .collect(); + let mut read_from_region: Vec = vec![]; + for r in region.region_read(&requests, JobId(0)).await?.into_iter() { + read_from_region.extend(r.data.iter()); + assert_eq!(r.block_contexts.len(), 1); + } assert_eq!(buffer.len(), read_from_region.len()); assert_eq!(buffer, read_from_region); @@ -2425,12 +2424,11 @@ pub(crate) mod test { .join(extent_file_name(i, ExtentType::Db)) .exists()); } - let read_from_region: Vec = region - .region_read(&requests, JobId(0)) - .await? - .into_iter() - .flat_map(|i| i.data.to_vec()) - .collect(); + let mut read_from_region: Vec = vec![]; + for r in region.region_read(&requests, JobId(0)).await?.into_iter() { + read_from_region.extend(r.data.iter()); + assert_eq!(r.block_contexts.len(), 1); + } assert_eq!(buffer.len(), read_from_region.len()); assert_eq!(buffer, read_from_region);