Skip to content

Commit

Permalink
Fix the flasky test_concurrent_snapshot_packaging caused by async remove
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangzhu70 committed Dec 15, 2022
1 parent 150ca0a commit 7944a05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2719,7 +2719,10 @@ pub fn verify_snapshot_archive<P, Q, R>(
// old archive structure.
let accounts_path = snapshot_slot_dir.join("accounts");
if accounts_path.is_dir() {
move_and_async_delete_path(&accounts_path);
// Do not use the async move_and_async_delete_path because the assert below
// requires the job to be done.
// This is for test only, so the performance is not an issue.
std::fs::remove_dir_all(accounts_path).unwrap();
}
let state_complete_path = snapshot_slot_dir.join("state_complete");
if state_complete_path.is_file() {
Expand Down

0 comments on commit 7944a05

Please sign in to comment.