Move test_purge_huge test (#23587)

* ignore test_purge_huge tests it is expensive.

* move test_purge to integration tests
This commit is contained in:
HaoranYi
2022-03-10 15:31:43 -06:00
committed by GitHub
parent ddd9d5a5a5
commit 83f5f8bfc3
3 changed files with 106 additions and 106 deletions

View File

@ -1,7 +1,7 @@
use {
solana_entry::entry,
solana_ledger::{
blockstore::{self, Blockstore},
blockstore::{self, make_many_slot_entries, test_all_empty_or_min, Blockstore},
get_tmp_ledger_path_auto_delete,
},
solana_sdk::hash::Hash,
@ -46,3 +46,15 @@ fn test_multiple_threads_insert_shred() {
blockstore.purge_and_compact_slots(0, num_threads + 1);
}
}
#[test]
fn test_purge_huge() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
let (shreds, _) = make_many_slot_entries(0, 5000, 10);
blockstore.insert_shreds(shreds, None, false).unwrap();
blockstore.purge_and_compact_slots(0, 4999);
test_all_empty_or_min(&blockstore, 5000);
}