Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable accountsdb_scan_account_storage_no_bank tests for hot storage #344

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading