Skip to content

Commit

Permalink
Enable accountsdb_scan_account_storage_no_bank tests for hot storage (#…
Browse files Browse the repository at this point in the history
…344)

Enable accountsdb_scan_account_storage_no_bank tests for hot storage.
  • Loading branch information
yhchiang-sol authored Apr 2, 2024
1 parent a37b85c commit e815925
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9504,6 +9504,7 @@ pub mod tests {
crate::{
account_info::StoredSize,
account_storage::meta::{AccountMeta, StoredMeta},
accounts_file::AccountsFileProvider,
accounts_hash::MERKLE_FANOUT,
accounts_index::{tests::*, AccountSecondaryIndexesIncludeExclude},
ancient_append_vecs,
Expand Down Expand Up @@ -10564,8 +10565,9 @@ pub mod tests {
}
}

#[test]
fn test_accountsdb_scan_account_storage_no_bank() {
#[test_case(AccountsFileProvider::AppendVec)]
#[test_case(AccountsFileProvider::HotStorage)]
fn test_accountsdb_scan_account_storage_no_bank(accounts_file_provider: AccountsFileProvider) {
solana_logger::setup();

let expected = 1;
Expand All @@ -10580,7 +10582,7 @@ pub mod tests {
slot_expected,
0,
size as u64,
AccountsFileProvider::AppendVec,
accounts_file_provider,
);
let av = AccountsFile::AppendVec(AppendVec::new(&tf.path, true, 1024 * 1024));
data.accounts = av;
Expand Down Expand Up @@ -10686,13 +10688,16 @@ pub mod tests {
}
}

#[test]
fn test_accountsdb_scan_account_storage_no_bank_one_slot() {
#[test_case(AccountsFileProvider::AppendVec)]
#[test_case(AccountsFileProvider::HotStorage)]
fn test_accountsdb_scan_account_storage_no_bank_one_slot(
accounts_file_provider: AccountsFileProvider,
) {
solana_logger::setup();

let expected = 1;
let tf = crate::append_vec::test_utils::get_append_vec_path(
"test_accountsdb_scan_account_storage_no_bank",
"test_accountsdb_scan_account_storage_no_bank_one_slot",
);
let (_temp_dirs, paths) = get_temp_accounts_paths(1).unwrap();
let slot_expected: Slot = 0;
Expand All @@ -10702,7 +10707,7 @@ pub mod tests {
slot_expected,
0,
size as u64,
AccountsFileProvider::AppendVec,
accounts_file_provider,
);
let av = AccountsFile::AppendVec(AppendVec::new(&tf.path, true, 1024 * 1024));
data.accounts = av;
Expand Down

0 comments on commit e815925

Please sign in to comment.