Drop poh_service to avoid unwanted ticking (#33150)

This commit is contained in:
Andrew Fitzgerald 2023-09-05 16:08:48 -07:00 committed by GitHub
parent 17b1b5646d
commit f8d304c610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -152,6 +152,9 @@ mod tests {
let blockstore = Arc::new(Blockstore::open(ledger_path.as_path()).unwrap());
let (exit, poh_recorder, poh_service, _entry_receiver) =
create_test_recorder(bank.clone(), blockstore, None, None);
// Drop the poh service immediately to avoid potential ticking
exit.store(true, Ordering::Relaxed);
poh_service.join().unwrap();
let my_pubkey = Pubkey::new_unique();
let decision_maker = DecisionMaker::new(my_pubkey, poh_recorder.clone());
@ -206,9 +209,6 @@ mod tests {
let decision = decision_maker.make_consume_or_forward_decision();
assert_matches!(decision, BufferedPacketsDecision::Forward);
}
exit.store(true, Ordering::Relaxed);
poh_service.join().unwrap();
}
#[test]