From 617c515ec1834501d4835076de3adcfb495d8ef9 Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 10 Jun 2020 15:56:05 -0400 Subject: add basic error handling --- tests/rand_fail.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/rand_fail.rs') 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, wal: &mut WALWriter) -> Box<[WALRingId]> { let records: Vec = 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, wal: &mut WALWriter) -> 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::>(), &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(); } -- cgit v1.2.3-70-g09d2