Removes solana_logger from snapshot_utils unit tests (#31510)

This commit is contained in:
Brooks 2023-05-05 12:52:36 -04:00 committed by GitHub
parent 10b8b32a31
commit 1d861ad558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 33 deletions

View File

@ -3570,7 +3570,6 @@ mod tests {
#[test]
fn test_parse_incremental_snapshot_archive_filename() {
solana_logger::setup();
assert_eq!(
parse_incremental_snapshot_archive_filename(&format!(
"incremental-snapshot-42-123-{}.tar.bz2",
@ -3656,7 +3655,6 @@ mod tests {
#[test]
fn test_check_are_snapshots_compatible() {
solana_logger::setup();
let slot1: Slot = 1234;
let slot2: Slot = 5678;
let slot3: Slot = 999_999;
@ -3727,7 +3725,6 @@ mod tests {
#[test]
fn test_get_bank_snapshots() {
solana_logger::setup();
let temp_snapshots_dir = tempfile::TempDir::new().unwrap();
let min_slot = 10;
let max_slot = 20;
@ -3739,7 +3736,6 @@ mod tests {
#[test]
fn test_get_highest_bank_snapshot_post() {
solana_logger::setup();
let temp_snapshots_dir = tempfile::TempDir::new().unwrap();
let min_slot = 99;
let max_slot = 123;
@ -3803,7 +3799,6 @@ mod tests {
#[test]
fn test_get_full_snapshot_archives() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_slot = 123;
@ -3823,7 +3818,6 @@ mod tests {
#[test]
fn test_get_full_snapshot_archives_remote() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_slot = 123;
@ -3848,7 +3842,6 @@ mod tests {
#[test]
fn test_get_incremental_snapshot_archives() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_full_snapshot_slot = 12;
@ -3875,7 +3868,6 @@ mod tests {
#[test]
fn test_get_incremental_snapshot_archives_remote() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_full_snapshot_slot = 12;
@ -3909,7 +3901,6 @@ mod tests {
#[test]
fn test_get_highest_full_snapshot_archive_slot() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_slot = 123;
@ -3931,7 +3922,6 @@ mod tests {
#[test]
fn test_get_highest_incremental_snapshot_slot() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let min_full_snapshot_slot = 12;
@ -4092,7 +4082,6 @@ mod tests {
#[test]
fn test_purge_old_incremental_snapshot_archives() {
solana_logger::setup();
let full_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let incremental_snapshot_archives_dir = tempfile::TempDir::new().unwrap();
let starting_slot = 100_000;
@ -4259,7 +4248,6 @@ mod tests {
/// bank possible, so the contents of the snapshot archive will be quite minimal.
#[test]
fn test_roundtrip_bank_to_and_from_full_snapshot_simple() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let original_bank = Bank::new_for_tests(&genesis_config);
@ -4314,7 +4302,6 @@ mod tests {
/// multiple transfers. So this full snapshot should contain more data.
#[test]
fn test_roundtrip_bank_to_and_from_snapshot_complex() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
let key2 = Keypair::new();
@ -4432,7 +4419,6 @@ mod tests {
/// of the accounts are not modified often, and are captured by the full snapshot.
#[test]
fn test_roundtrip_bank_to_and_from_incremental_snapshot() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
let key2 = Keypair::new();
@ -4556,7 +4542,6 @@ mod tests {
/// Test rebuilding bank from the latest snapshot archives
#[test]
fn test_bank_from_latest_snapshot_archives() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
let key2 = Keypair::new();
@ -4699,8 +4684,6 @@ mod tests {
/// no longer correct!
#[test]
fn test_incremental_snapshots_handle_zero_lamport_accounts() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
let key2 = Keypair::new();
@ -4890,7 +4873,6 @@ mod tests {
#[test]
fn test_bank_fields_from_snapshot() {
solana_logger::setup();
let collector = Pubkey::new_unique();
let key1 = Keypair::new();
@ -5103,7 +5085,6 @@ mod tests {
#[test]
fn test_bank_snapshot_dir_accounts_hardlinks() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank = Bank::new_for_tests(&genesis_config);
@ -5149,8 +5130,6 @@ mod tests {
#[test]
fn test_get_snapshot_accounts_hardlink_dir() {
solana_logger::setup();
let slot: Slot = 1;
let mut account_paths_set: HashSet<PathBuf> = HashSet::new();
@ -5190,8 +5169,6 @@ mod tests {
#[test]
fn test_get_highest_bank_snapshot() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let _bank = create_snapshot_dirs_for_tests(&genesis_config, &bank_snapshots_dir, 4, 0);
@ -5222,8 +5199,6 @@ mod tests {
#[test]
pub fn test_create_all_accounts_run_and_snapshot_dirs() {
solana_logger::setup();
let (_tmp_dirs, account_paths): (Vec<TempDir>, Vec<PathBuf>) = (0..4)
.map(|_| {
let tmp_dir = tempfile::TempDir::new().unwrap();
@ -5270,8 +5245,6 @@ mod tests {
#[test]
fn test_clean_orphaned_account_snapshot_dirs() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let _bank = create_snapshot_dirs_for_tests(&genesis_config, &bank_snapshots_dir, 2, 0);
@ -5482,8 +5455,6 @@ mod tests {
#[test]
fn test_bank_from_snapshot_dir() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let bank = create_snapshot_dirs_for_tests(&genesis_config, &bank_snapshots_dir, 3, 0);
@ -5527,8 +5498,6 @@ mod tests {
#[test]
fn test_bank_from_latest_snapshot_dir() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let bank = create_snapshot_dirs_for_tests(&genesis_config, &bank_snapshots_dir, 3, 3);
@ -5560,8 +5529,6 @@ mod tests {
#[test]
fn test_purge_old_bank_snapshots() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let bank_snapshots_dir = tempfile::TempDir::new().unwrap();
let _bank = create_snapshot_dirs_for_tests(&genesis_config, &bank_snapshots_dir, 10, 5);