aboutsummaryrefslogtreecommitdiff
path: root/tests/rand_fail.rs
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-06-10 15:56:05 -0400
committerDeterminant <tederminant@gmail.com>2020-06-10 15:56:05 -0400
commit617c515ec1834501d4835076de3adcfb495d8ef9 (patch)
tree56e12428154cdb5c94de4a414d3e0966b054e70d /tests/rand_fail.rs
parent415578aa48a12cac01d763b7c08384dbcd46911b (diff)
add basic error handling
Diffstat (limited to 'tests/rand_fail.rs')
-rw-r--r--tests/rand_fail.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/rand_fail.rs b/tests/rand_fail.rs
index 988da05..7499694 100644
--- a/tests/rand_fail.rs
+++ b/tests/rand_fail.rs
@@ -7,7 +7,7 @@ mod common;
fn test(records: Vec<String>, wal: &mut WALWriter<common::WALStoreEmul>) -> Box<[WALRingId]> {
let records: Vec<WALBytes> = records.into_iter().map(|s| s.into_bytes().into_boxed_slice()).collect();
- let ret = wal.grow(&records);
+ let ret = wal.grow(&records).unwrap();
for ring_id in ret.iter() {
println!("got ring id: {:?}", ring_id);
}
@@ -17,9 +17,9 @@ fn test(records: Vec<String>, wal: &mut WALWriter<common::WALStoreEmul>) -> Box<
#[test]
fn test_rand_fail() {
let mut state = common::WALStoreEmulState::new();
- let mut wal = WALLoader::new(common::WALStoreEmul::new(&mut state), 9, 8, 1000).recover();
+ let mut wal = WALLoader::new(common::WALStoreEmul::new(&mut state), 9, 8, 1000).recover().unwrap();
for _ in 0..3 {
test(["hi", "hello", "lol"].iter().map(|s| s.to_string()).collect::<Vec<String>>(), &mut wal);
}
- let mut wal = WALLoader::new(common::WALStoreEmul::new(&mut state), 9, 8, 1000).recover();
+ let mut wal = WALLoader::new(common::WALStoreEmul::new(&mut state), 9, 8, 1000).recover().unwrap();
}