Fix channel panic in tests (#16503)

* Fix channel panic

* Add exit signal to PohRecorder because Crossbeam doesnt drop objects inside dropped channel
This commit is contained in:
carllin
2021-04-14 10:07:21 -07:00
committed by GitHub
parent eddfe06a00
commit f0c150cfb9
5 changed files with 131 additions and 49 deletions

View File

@ -331,7 +331,7 @@ mod test {
system_program, system_transaction,
timing::timestamp,
};
use std::sync::mpsc::channel;
use std::sync::{atomic::AtomicBool, mpsc::channel};
#[test]
fn service_exit() {
@ -811,6 +811,7 @@ mod test {
&Arc::new(blockstore),
&Arc::new(LeaderScheduleCache::new_from_bank(&bank)),
&Arc::new(PohConfig::default()),
Arc::new(AtomicBool::default()),
);
let node_keypair = Arc::new(Keypair::new());