diff options
author | Determinant <[email protected]> | 2020-06-12 11:28:09 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-06-12 11:28:09 -0400 |
commit | 4b2c4cdf5de3e7bd1df954dccc320806b18fd1fb (patch) | |
tree | fe5664998e8d2882e261b8ebb76eb682cd432c2c /tests/common/mod.rs | |
parent | f69fd448feec51bee8cb579ac35b1f93d2a80e14 (diff) |
clean up
Diffstat (limited to 'tests/common/mod.rs')
-rw-r--r-- | tests/common/mod.rs | 9 |
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() { |