Blockstore test cleanup (#19656)

* Use auto-deleting macro for ledger path
This commit is contained in:
steviez
2021-09-10 07:33:08 -05:00
committed by GitHub
parent 311b5789af
commit 2dee098b91
8 changed files with 3795 additions and 3954 deletions

View File

@ -41,8 +41,8 @@ mod tests {
#[test]
fn test_next_slots_iterator() {
let blockstore_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&blockstore_path).unwrap();
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
blockstore.set_roots(std::iter::once(&0)).unwrap();
let ticks_per_slot = 5;
/*
@ -107,8 +107,5 @@ mod tests {
.collect();
let expected = vec![4].into_iter().collect();
assert_eq!(result, expected);
drop(blockstore);
Blockstore::destroy(&blockstore_path).expect("Expected successful database destruction");
}
}