Fixes race in local cluster incremental snapshot test (#30340)

This commit is contained in:
Brooks 2023-02-15 15:54:48 -05:00 committed by GitHub
parent b86bfbb5c5
commit 4d289222c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -1054,6 +1054,11 @@ fn test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_st
};
info!("leader full snapshot archive for comparison: {leader_full_snapshot_archive_for_comparison:#?}");
// Stop the validator before we reset its snapshots
info!("Stopping the validator...");
let validator_info = cluster.exit_node(&validator_identity.pubkey());
info!("Stopping the validator... DONE");
info!("Delete all the snapshots on the validator and restore the originals from the backup...");
delete_files_with_remote(
validator_snapshot_test_config
@ -1093,15 +1098,10 @@ fn test_incremental_snapshot_download_with_crossing_full_snapshot_interval_at_st
info!(
"Restarting the validator with full snapshot {validator_full_snapshot_slot_at_startup}..."
);
// Stop the test validator
let validator_info = cluster.exit_node(&validator_identity.pubkey());
// To restart, it is not enough to remove the old bank snapshot directories under snapshot/.
// The old hardlinks under <account_path>/snapshot/<slot> should also be removed.
// The purge call covers all of them.
snapshot_utils::purge_old_bank_snapshots(validator_snapshot_test_config.bank_snapshots_dir, 0);
cluster.restart_node(
&validator_identity.pubkey(),
validator_info,