summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/common/mod.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index ba302f9..70c8d8e 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -542,15 +542,16 @@ impl PaintingSim {
let payloads =
pss.iter().map(|e| e.to_bytes()).collect::<Vec<WALBytes>>();
// write ahead
- let (rids, ok) = wal.grow(payloads);
+ let rids = wal.grow(payloads);
assert_eq!(pss.len(), rids.len());
+ let rids = rids.into_iter().map(|r| futures::executor::block_on(r)).collect::<Vec<_>>();
// keep track of the operations
+ // grow could fail
for (ps, rid) in pss.iter().zip(rids.iter()) {
ops.push(ps.clone());
- ringid_map.insert(*rid, ops.len() - 1);
+ ringid_map.insert((*rid)?, ops.len() - 1);
}
- // grow could fail
- futures::executor::block_on(ok)?;
+ let rids = rids.into_iter().map(|r| r.unwrap());
// finish appending to WAL
/*
for rid in rids.iter() {