Blockstore test cleanup (#19656)
* Use auto-deleting macro for ledger path
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user